Hi

I have had a problem reported from someone using a Perl cgi script with
WebJames. They are trying to read data from a HTML form (using post),
using read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}).
However this hangs the machine, until either return or escape is pressed.

After a bit of investigating, I have found that this happens when WebJames
invokes the script with RISC OS style redirection, eg
scriptname { < scrapfilein > scrapfileout }
but when Unix style is used
scriptname < scrapfilein > scrapfileout
then the script does not hang, and produces the correct output.

So it seems that when RISC OS style redirection is used, Perl (or
UnixLib?) is buffering stdin, and is waiting for a newline.

Does anyone have any idea how to fix this?
I don't really want to change the style of redirection that WebJames uses,
as that would not work with for example BASIC scripts.


Cheers

Alex

-- 
Alex Waugh  Electronics student  [EMAIL PROTECTED]

RISC OS freeware at http://www.ecs.soton.ac.uk/~ajw498/


Reply via email to