home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / os / os2 / programm / 7387 < prev    next >
Encoding:
Text File  |  1993-01-07  |  1.5 KB  |  34 lines

  1. Newsgroups: comp.os.os2.programmer
  2. Path: sparky!uunet!cis.ohio-state.edu!zaphod.mps.ohio-state.edu!caen!spool.mu.edu!agate!linus!philabs!trintex!elr
  3. From: elr@trintex.uucp (Ed Ravin)
  4. Subject: Named Pipes: 1.3 program breaks under 2.0
  5. Message-ID: <1993Jan7.181550.8778@trintex.uucp>
  6. Organization: Prodigy Services Co.
  7. Date: Thu, 7 Jan 1993 18:15:50 GMT
  8. Lines: 24
  9.  
  10. Here's an odd one -- I have a pair of programs that communicate over
  11. named pipes.
  12.  
  13. The server does a DosMakeNmPipe() and then DosConnectNmPipe(),
  14. then repeatedly does a DosRead() looking for data.  If the DosRead()
  15. fails, I do DosResetNmPipe() and then go back to the DosConnectNmPipe().
  16.  
  17. The client does a DosOpen() of the pipe, then a DosWrite() of the
  18. message, then immediately does a DosClose().
  19.  
  20. Under OS/2 1.3, this all worked OK.  But when I moved the programs to
  21. OS/2 2.0, they started breaking -- the server gets an error 109 (pipe
  22. broken) while waiting for the client in DosConnectNmPipe().
  23.  
  24. I modified the client to sleep 5 seconds before doing the DosClose(), and
  25. now everything works like it used to.  Somehow, the DosClose() was getting
  26. ahead of the data written to the pipe and canceling the transaction.
  27.  
  28. What did IBM change in OS/2 2.0 with named pipes?
  29. -- 
  30. Ed Ravin- elr@trintex.uucp| I like to think (and the sooner the better!)
  31.   elr%trintex@uunet.uu.net| Of a cybernetic meadow where mammals and computers
  32.            +1-914-993-4737| Live together in mutually programming harmony
  33. my opinions, nobody else's| Like pure water touching clear sky.  -R. Brautigan
  34.