[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-janitors] #766: posix: can't collect exit status and close
From: |
Chicken Trac |
Subject: |
Re: [Chicken-janitors] #766: posix: can't collect exit status and close all process ports at the same time |
Date: |
Wed, 03 Oct 2012 22:21:46 -0000 |
#766: posix: can't collect exit status and close all process ports at the same
time
----------------------+-----------------------------------------------------
Reporter: syn | Owner:
Type: defect | Status: new
Priority: major | Milestone:
Component: unknown | Version: 4.7.x
Resolution: | Keywords:
----------------------+-----------------------------------------------------
Comment(by sjamaan):
Wrapping them is the way I deal with it in scsh-process. I think it could
be a good idea to put something like this in core. There are various
annoying issues with the Unix model in a Scheme program. For example, the
{{{(process-wait (process-fork (lambda () ...)))}}} idiom will fail when
this is done in a library and the user decides to {{{(process-wait)}}} in
another thread. If you're unlucky, a context switch could happen in
between, and the {{{process-wait}}} call in the library would fail, while
the user would be getting the status code of an unexpected process.
Doing it "the SCSH way" makes code more composable. Finally, I think fork
should only copy the current thread and abandon all others. This may be
trickier than we think, though!
--
Ticket URL: <http://bugs.call-cc.org/ticket/766#comment:5>
Chicken Scheme <http://www.call-with-current-continuation.org/>
Chicken Scheme is a compiler for the Scheme programming language.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [Chicken-janitors] #766: posix: can't collect exit status and close all process ports at the same time,
Chicken Trac <=