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