On 25 April 2012 19:48, Sean P. DeNigris <sean@clipperadams.com> wrote:
Sean P. DeNigris wrote
p upToEnd. "This hangs, even though there is output in the pipe"
I debugged this with the Stack VM from Jenkins. It's hanging in sqFileBasicPluginPrims.c on line 360: Â bytesRead = fread(dst, 1, count, file);
This line seems to never return, although the docs suggest that it should just return an error or less data if the requested data is not available.
fread is just a thin wrapper around read() call. it blocks the caller upon completing an operation. you can set a file handle to non-blocking mode using fcntl() call with O_NONBLOCK flag. Which i think is a first and foremost thing which VM should do to prevent blocking like that :)
HTH, Sean
-- View this message in context: http://forum.world.st/OSProcess-is-process-done-tp4569088p4587479.html Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
-- Best regards, Igor Stasenko.