home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!gatech!news.byu.edu!hamblin.math.byu.edu!sol.ctr.columbia.edu!usc!rpi!bu.edu!cs!tasos
- From: tasos@cs.bu.edu (Anastasios Kotsikonas)
- Newsgroups: comp.unix.aix
- Subject: prob w/ sockets
- Message-ID: <102483@bu.edu>
- Date: 18 Nov 92 18:55:16 GMT
- Sender: news@bu.edu
- Organization: Computer Science Department, Boston University, Boston, MA, USA
- Lines: 37
- Originator: tasos@cs
-
-
- Hello all,
- let me first reiterate my frustration with AIX; the problem: I am writing
- a gateway which accepts tcp/ip connections on both ends and passes info
- back and forth; both sockets are marked as non-blocking. Well, the code
- works perfectly well on SGI, HP, SUN, DG and pure SVR4 systems and the
- g..damn AIX screws up; one of the sockets BLOCKS!!!! Here the relevant
- piece of code:
-
- if (FD_ISSET (msg_sock, &readfds)) {
- while ((printf ("reading...\n")) &&
- (bytes_read = read (msg_sock, buf, BUFFSIZ) > 0) &&
- printf ("read\n")) {
- if (write (server_sock, buf, bytes_read) < 0)
- return;
- printf ("OK\n");
- }
-
-
-
- And do you know what I get as ouput? Here it is:
-
- reading...
- read
- OK
- reading...
-
- And here is the worst: read() returned with -1 (!!!!!!), but that was AFTER
- the client (from which read() was supposedly waiting for data) closed the
- connection.
-
- Looking forward to the day that IBM goes out of business. Seriously. I am
- running under 3.2.2
-
- Thanks for listening.
-
- Tasos
-