quoth Evan Laforge qdun...@gmail.com,
...
and it still waits for the subprocess to complete. Actually, it looks
like it's the client's hGetContents, since hGetChar comes back
immediately. I guess that's understandable, but even hGetLine blocks.
In the version I was looking at, if I change
On Sun, Apr 21, 2013 at 9:25 PM, Donn Cave d...@avvanta.com wrote:
Quoth Evan Laforge qdun...@gmail.com,
sleep = Process.createProcess (Process.proc sleep [5])
sleep = Process.createProcess
((Process.proc sleep [5]) {Process.close_fds = True})
- Because the client uses buffered
* Evan Laforge qdun...@gmail.com [2013-04-22 12:41:33+0530]
On Sun, Apr 21, 2013 at 9:25 PM, Donn Cave d...@avvanta.com wrote:
Quoth Evan Laforge qdun...@gmail.com,
sleep = Process.createProcess (Process.proc sleep [5])
sleep = Process.createProcess
((Process.proc sleep [5])
quoth Evan Laforge qdun...@gmail.com,
...
Oh I see, because the subprocess inherits the socket connection. That
makes sense, though it's tricky. Tricky tricky unix. Why does fork()
have to be so complicated?
Well, it's very elegant really. It's one of the tools UNIX gives
you to decompose
On Mon, Apr 22, 2013 at 7:39 PM, Donn Cave d...@avvanta.com wrote:
quoth Evan Laforge qdun...@gmail.com,
...
Oh I see, because the subprocess inherits the socket connection. That
makes sense, though it's tricky. Tricky tricky unix. Why does fork()
have to be so complicated?
Well, it's
I've had a strange bug that's baffled me for a long time. I finally
got serious about tracking it down, and managed to reduce it to a
small program that exhibits the unexpected behaviour, namely that a
createProcess seems to block writing to and closing a socket.
Here's the example program:
---
Quoth Evan Laforge qdun...@gmail.com,
sleep = Process.createProcess (Process.proc sleep [5])
sleep = Process.createProcess
((Process.proc sleep [5]) {Process.close_fds = True})
- Because the client uses buffered I/O (hGetContents in this case, but
hGet-anything would be the same), it