Donn Cave wrote:
On Tue, 21 Feb 2006, Simon Marlow wrote:
The reason for the deadlock is because getChar is holding a lock on
stdin, and System.Cmd.system needs to access the stdin Handle in order
to know which file descriptor to dup as stdin in the child process (the
stdin Handle isn't
Einar Karttunen wrote:
Hello
Using system or any variant of it from System.Process
seems broken in multithreaded environments. This
example will fail with and without -threaded.
When run the program will print hello: start and
then freeze. After pressing enter (the first getChar)
On Tue, 21 Feb 2006, Simon Marlow wrote:
...
The reason for the deadlock is because getChar is holding a lock on
stdin, and System.Cmd.system needs to access the stdin Handle in order
to know which file descriptor to dup as stdin in the child process (the
stdin Handle isn't always FD 0,