Added failing (hanging) test for RUN-PROGRAM.#29
Conversation
|
unfortunately this test in its current form is not too travis friendly, because it hangs... :/ |
|
@fare you may want to check this out if it's relevant for the run-program code in UIOP. |
|
Well, iolib has its own run-program, independent from uiop's. UIOP's run-program isn't geared for asynchronous / non-blocking calls (except that on some implementations it uses such a call underneath). |
|
@fare the issue is when using pipes: but now that i think about it, if this bug exists somewhere else, then it's in the CL implementations's run-program, not in UIOP, that merely wraps them. sorry for the noise. |
|
FTR, on sbcl this runs as expected: but this hangs: |
|
Well, if the lisp program doesn't drain the pipe, of course pipe will block after a short while. |
|
FTR, sbcl has a :wait nil arg for this. |
|
SBCL's :wait nil causes RUN-PROGRAM to return immediately. For that IOlib has CREATE-PROCESS, which also supports a few more features wrt. FD indirections. RUN-PROGRAM is intended to be for simple synchronous uses. |
|
That said, you're right that the draining of the two pipes should occur simultaneously, so I'll use a simple poll() event-loop. That ought to be fairly portable. |
|
Yeah, that's why uiop:run-program uses only one pipe at most, and redirects the other stream (if any) to a file — that's the only way to work synchronously that's portable. |
33a68c9 to
ff8c6fb
Compare
unfortunately unix only, i cannot test on windows.