[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Chicken-users] POSIX fork & srfi-18 interactions
From: |
Andy Bennett |
Subject: |
[Chicken-users] POSIX fork & srfi-18 interactions |
Date: |
Thu, 13 Sep 2012 11:51:02 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:10.0.6esrpre) Gecko/20120817 Icedove/10.0.6 |
Hi,
I'm trying to fork & exec using the process-... procedures from the
posix egg.
My program (which involves spiffy) has a bunch of srfi-18 threads
running and I note that one doesn't get the same semantics as with fork
and pthreads in C. Namely, the new fork contains all the srfi-18 threads
and they're all running. There's no opportunity to get in there and stop
them from running in the child without declaring the whole module
"disable-interrupts".
The reason I need to fork and then exec is that I need to fiddle with
some file descriptors in the child before I exec.
For now I've written a fork-exec function in C and bound it to a
foreign-lambda. I believe this will work as the chicken scheduler will
be disabled throughout the single call to the foreign-lambda.
Is this interaction between the posix egg and srfi-18 considered a bug?
Is there anything that can be done about it?
Regards,
@ndy
--
address@hidden
http://www.ashurst.eu.org/
0x7EBA75FF
- [Chicken-users] POSIX fork & srfi-18 interactions,
Andy Bennett <=