On Sep 29 2011, Alan Post wrote:
This patch removes the enable/disable interrupt flag from the
scheduled.
I can't see that this code is referenced. I'm not sure someone
would just write this feature for fun, however. Is this code
actually used?
Be careful!
I found it to be win to actually reference and use that code.
I do lot's of process-fork. The childs will soon be replaced
by another program. Why should they spend time in garbage collection
before the exec call? Futhermore it's dangerous to leave all
threads enabled after a fork. I've seen cases when those subprocess
managed to write to file descriptors used by the parent.
That's one the the things on my list: find some better way to do
the fork. So far I do
(define-foreign-variable C_interrupts_enabled bool "C_interrupts_enabled")
(define (chicken-enable-interrupts!) (set! C_interrupts_enabled #t))
(define chicken-disable-interrupts! (foreign-lambda void
"C_disable_interrupts"))
(let ((pid (begin
(chicken-disable-interrupts!)
((foreign-lambda int "fork")) ))
(if (not (= pid 0)) (chicken-enable-interrupts!))
...
)
I'm preparing a larger patch for the signal handling code, so
knowing whether this is used (and how) is important for getting
my next set of patches correct.
-Alan
_______________________________________________
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users