Writing to a named pipe imposible if there is no reading process running

From: Thanassis Dolmatzis (sinefula_at_web.de)
Date: 12/08/03


Date: 8 Dec 2003 07:47:50 -0800

Wondering why I am the only programmer having this trouble, here is my
unsolvable problem.
Porting my C-Programms to SuSE Linux Enterprse Server8 was no big deal
except that:
I have a named pipe called "protpipe" and one process runing, reading
out of that pipe and writing the contents to a text file.
Whith this concept any process writing in this pipe will get its text
writen in the correct order in the text file without los of data.
On HP-UX and other Unix derivates, the writing processes had the
oportunity to write to that pipe even when the reading process wasn't
running. In that case an "ls -l protpipe" showed the size of the
writen bytes.
When i there after startet the reading process, the contents of the
pipe get in the text file as expectet.
I didn't found on Linux a way doing the same: If I try to write in to
the pipe when the reading process does not exist, the writing process
breaks up writing, or blocks depending on the Flags I set in the
"open()" system call.

Hoping You understand my English,
thanks for any help,

Athanasios Dolmatzis
P.S.:If necessary I could copy the coding in to the message.



Relevant Pages

  • Re: Pipe/Fork revisited - 4 proc program
    ... and the one it's writing to). ... If the input side of a pipe does not close, the reading process will not ... have another function set up to close the right ones ...
    (comp.unix.programmer)
  • Re: asynchronously writing to a file, a cheap way?
    ... your typical asynchronous route for writing to a file, ... performance when the processing server is running. ... end of the pipe doesn't need to be running. ... I you already have a thread pool or IOCP that you can use t handle the ...
    (microsoft.public.win32.programmer.kernel)
  • Re: Running a command-line program and reading/writing its stdin/stdout/stderr
    ... > The reason it fails is that the 2 ends of the pipe are not ... one is only good for writing, the other only for reading. ... The reason why i begun writing this program (that is only at its early ...
    (comp.os.linux.development.apps)
  • Re: Why is my overlapped WriteFile getting blocked? (repost)
    ... now the issue is: You are using overlapped IO in named pipe programming. ... In client side, in NPClient, in ClientDlgProc function, in IDB_SEND, we revised the code as the following: ... beginning writing pipe... ... Now we are leaving ERROR_IO_PENGING... ...
    (microsoft.public.win32.programmer.networks)
  • Re: Writing to a named pipe imposible if there is no reading process running
    ... >out of that pipe and writing the contents to a text file. ... Standard behaviour wjhen opening a FIFO is this: ... opening the FIFO for writing blocks until another process opens the ...
    (comp.os.linux.development.apps)