Re: Getting unbuffered output from a subprocess

2001-06-14 Thread Doug MacEachern
On Tue, 27 Mar 2001, Andrew Ho wrote: Hello, So, when doing a CGI and needing to execute a subprocess with input based on user input, I always do a open()-fork()-exec() like so: ... When using a mod_perl script, I use Apache::SubProcess and the above stuff still works. However, let's say

Getting unbuffered output from a subprocess

2001-03-27 Thread Andrew Ho
Hello, So, when doing a CGI and needing to execute a subprocess with input based on user input, I always do a open()-fork()-exec() like so: if(defined(my $pid = open(KID, '-|'))) { if($pid) { print while KID; close KID; } else { %ENV = (