dnahman has asked for the wisdom of the Perl Monks concerning the following question:
works, but:printf("Content-type: text/html\n\n"); system("touch /usr/tmp/bogus");
doesnt. If I do the same thing under csh or c, it works fine. In fact, just using csh, the server acts as if I have non-parsed-headers and prints the output of my external program (which takes about 1sec to run, and gets called 20 or so times) sequentially each time it is called, which gives my users a nice status update. I've also tried turning autoflush on stdout for the script:printf("Content-type: text/html\n\n"); system("echo hello");
but that doesn't seem to do it either.$old_fh = select(OUTPUT_HANDLE); $| = 1; select($old_fh);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: system() and malformed headers
by Anonymous Monk on Jul 07, 2001 at 07:27 UTC | |
by dnahman (Initiate) on Jul 09, 2001 at 21:58 UTC | |
|
Re: system() and malformed headers
by Anonymous Monk on Jul 07, 2001 at 08:11 UTC | |
|
Re: system() and malformed headers
by John M. Dlugosz (Monsignor) on Jul 08, 2001 at 00:20 UTC |