[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] remove enable/disable interrupt flag

From: Jörg F . Wittenberger
Subject: Re: [Chicken-users] remove enable/disable interrupt flag
Date: 29 Sep 2011 15:43:16 +0200

On Sep 29 2011, Alan Post wrote:

This patch removes the enable/disable interrupt flag from the

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
 ((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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]