Article View: comp.os.os2.programmer
Article #3332Named Pipes: 1.3 program breaks under 2.0
From: Ed Ravin
Date: Thu, 07 Jan 1993 18:15
Date: Thu, 07 Jan 1993 18:15
24 lines
1576 bytes
1576 bytes
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
Technical Details
Message-ID:
<1993Jan7.181550.8778@trintex.uucp>Path:
arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!zaphod.mps.ohio-state.edu!caen!spool.mu.edu!agate!linus!philabs!trintex!elrShow Full Headers
Complete Article Headers
Newsgroups: comp.os.os2.programmer Path: arc1-ca.pugleaf.net!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