Using Named Pipes
| From: | Jonathan Rosenberg | Date: | Thu, 30 May 2002 20:06:14 +0000 |
| Subject: | Using Named Pipes | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-99996@lists.php.net to get a copy of this message | ||
I'm trying to use a named pipe in PHP, but I have a feeling I'm
misunderstanding something. I'm hoping someone might have some
insight. Here's the basic outline of what I'm doing
posix_mkfifo($argfile, 0600)
$argp = fopen($argfile, "w+");
$command = "program $argfile";
$fp = popen($command, "r");
fputs($argp, 'data = ' . $post);
$response = fgetcsv($fp, 1000);
The named pipe is being created ok. But my page hangs while
trying to read the response in the last line. Everything works
fine if I replace the named pipe with a standard file. So it
really seems that it is the use of the named pipe that is wedging
me.
Any thoughts?
--
JR