posix_mkfifo() (was: Writing to process STDIN and reading its STDOUT from PHP4?)

From: Date: Wed, 27 Sep 2000 06:45:15 +0000
Subject: posix_mkfifo() (was: Writing to process STDIN and reading its STDOUT from PHP4?)
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-17675@lists.php.net to get a copy of this message
Thanks Teodor! But can someone provide an example of how to use posix_mkfifo()? The PHP manual page for posix_mkfifo() says "Needs to be written ASAP". Suppose I want to pass the text of $content in PHP to 'wc' and read wc's STDOUT, for example... ----- Original Message ----- From: "Teodor Cimpoesu" <teo@digiro.net> To: <php-general@lists.php.net> Sent: Tuesday, September 26, 2000 4:46 AM Subject: Re: [PHP] Writing to process STDIN and reading its STDOUT from PHP4? > Hi Steve! > On Sat, 23 Sep 2000, Steve Hsieh wrote: > > > Thanks Robert, > > > > However, those functions deal with PHP's own stdin/stdout. What I am trying > > to do is write to STDIN of a process started by PHP and then read the > > process STDOUT. > the see popen(). Redirect command output to a file, and read from that > file. > > Alternatively, you may look at posix_mkfifo(). Redirect the output > of the command to a pipe, and fopen() it and fread() from is as from > regular files. > > -- teodor > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#17675) next »