On Thu, Feb 23, 2012 at 11:05 PM, Andy Wingo
<address@hidden> wrote:
On Wed 22 Feb 2012 22:40, Andy Wingo <
address@hidden> writes:
> Obviously we can treat the limited case of (ice-9 popen) in a more
> portable fashion.
I have now rewritten open-process from ice-9 popen in C, so as to be
sure that only async-signal-safe routines get called. This should make
ice-9 popen work reliably even in threaded environments.
> Do we in the Guile project have to choose between threads and fork?
I think the short answer here is simply "yes". A guile built without
threads may fork to its heart's content. However a guile built with
threads -- the default, recommended configuration -- should not call
primitive-fork. Instead, it should use open-process. I'll add
something to the docs.
In master, we should consider not providing primitive-fork, if Guile is
built with threads. What do folks think about that?
I just want to do my negative vote when I saw "choose thead then fork die", but I see "open-process" soon. ;-)
So, what's the difference between "primitive-fork" and "open-process"? If they're different, I think much code to be modified for me...I believe I'm not the only layman to use "fork" and "thread" both.
Regards,
Andy
--
http://wingolog.org/