[Top][All Lists]

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

Re: [Chicken-users] replace signal with sigaction

From: Jörg F . Wittenberger
Subject: Re: [Chicken-users] replace signal with sigaction
Date: 02 Oct 2011 13:37:24 +0200


in this message
I sent out a strange bug.  Sorry for that.

The child-registering fork() should be:

(define (save-fork)
(let* ((ie (##sys#fudge 14))
       (pid (begin (chicken-disable-interrupts!)
                   ((foreign-lambda int "fork")))))
  (case pid
    ((0) (set! processes-running (make-hash-table fx= number-hash)))
    ((-1) (if ie (chicken-simple-enable-interrupts!)))
    (else (hash-table-set! processes-running pid (list pid))
           (if ie (chicken-simple-enable-interrupts!))))

The way I miss-cut&pasted it together would switch off interrupt
handling completely.  (Which I did not notice, since those changes
in signal handling would work even with interrupt disabled.

Actually this make me wonder if it would be possible to actually
remove it from the source.  Wait - I'm not proposing that hereby.


reply via email to

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