home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / unix / aix / 11688 < prev    next >
Encoding:
Internet Message Format  |  1992-11-18  |  1.4 KB

  1. Path: sparky!uunet!gatech!news.byu.edu!hamblin.math.byu.edu!sol.ctr.columbia.edu!usc!rpi!bu.edu!cs!tasos
  2. From: tasos@cs.bu.edu (Anastasios Kotsikonas)
  3. Newsgroups: comp.unix.aix
  4. Subject: prob w/ sockets
  5. Message-ID: <102483@bu.edu>
  6. Date: 18 Nov 92 18:55:16 GMT
  7. Sender: news@bu.edu
  8. Organization: Computer Science Department, Boston University, Boston, MA, USA
  9. Lines: 37
  10. Originator: tasos@cs
  11.  
  12.  
  13. Hello all,
  14. let me first reiterate my frustration with AIX; the problem: I am writing
  15. a gateway which accepts tcp/ip connections on both ends and passes info
  16. back and forth; both sockets are marked as non-blocking. Well, the code
  17. works perfectly well on SGI, HP, SUN, DG and pure SVR4 systems and the
  18. g..damn AIX screws up; one of the sockets BLOCKS!!!! Here the relevant
  19. piece of code:
  20.  
  21.     if (FD_ISSET (msg_sock, &readfds)) {
  22.       while ((printf ("reading...\n")) &&
  23.          (bytes_read = read (msg_sock, buf, BUFFSIZ) > 0) &&
  24.           printf ("read\n")) {
  25.         if (write (server_sock, buf, bytes_read) < 0)
  26.           return;
  27.     printf ("OK\n");
  28.       }
  29.  
  30.  
  31.  
  32. And do you know what I get as ouput? Here it is:
  33.  
  34. reading...
  35. read
  36. OK
  37. reading...
  38.  
  39. And here is the worst: read() returned with -1 (!!!!!!), but that was AFTER 
  40. the client (from which read() was supposedly waiting for  data) closed the
  41. connection.
  42.  
  43. Looking forward to the day that IBM goes out of business. Seriously. I am
  44. running under 3.2.2
  45.  
  46. Thanks for listening.
  47.  
  48. Tasos
  49.