ID:               26271
 Updated by:       [EMAIL PROTECTED]
 Reported By:      tipton at shsu dot edu
-Status:           Open
+Status:           Bogus
 Bug Type:         Filesystem function related
 Operating System: Fedora Core 1
 PHP Version:      4.3.3
 New Comment:

Pipes are read as any other file on unix, using fopen() fread() &
friends.


Previous Comments:
------------------------------------------------------------------------

[2003-11-17 17:31:52] tipton at shsu dot edu

please re-read my description of the problem.

i am not trying to open a "pipe" to a program that was started (i.e.
not stdin, stdout, or stderr) which is what one would use popen() or
proc_open() for.

what i would like to do is open a pipe (made with posix_mkfifo()) from
a master "server" script and have another script run occasionally and
use the pipe for IPC (Inter-Process Communication) by writing to it.

maybe the documentation for posix_mkfifo() should have some sample code
illustrating how to read/write from/to a fifo, like is shown on the
fopen() page dealing with reading regular files.

------------------------------------------------------------------------

[2003-11-17 16:35:24] [EMAIL PROTECTED]

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

You should be using popen() and/or proc_open() to work with pipes.

------------------------------------------------------------------------

[2003-11-16 02:11:00] tipton at shsu dot edu

Description:
------------
wrote a script to test with following the order: create pipe, open pipe
for writing, write to pipe, close pipe.  with another script to open
the pipe, read from the pipe, close the pipe, unlink the pipe.

the writer script hangs on the fopen() unless it's mode is 'w+', the
reader script hangs on the fopen() regardless of mode.

i accept that it may be something i am doing wrong, but i can find no
documentation anywhere dealing with pipes in PHP.

Reproduce code:
---------------
writer - http://piplipton.homelinux.org/socket/test.txt

reader - http://piplipton.homelinux.org/socket/test2.txt

substitute .php for .txt in the above links to run the actual scripts.



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=26271&edit=1

Reply via email to