bugGuile - Bugs: bug #20083, sigaction lambda appears not to...

 
 

bug #20083: sigaction lambda appears not to get called in 1.8.1

Submitted by:  Gregory Marton <gremio>
Submitted on:  Tue 05 Jun 2007 10:27:30 AM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Wed 06 Jun 2007 07:44:47 AM UTC, comment #1:

Hi,

The handler does get called but it gets called asynchronously:

guile> (sigaction SIGALRM (lambda (sig) (display "hello\n")))
(0 . 268435456)
guile> (raise SIGALRM)
guile> hello

Thus, one cannot expect it to be called right after the `raise' invocation as in your example.

See node "Asyncs" in the manual.

Hope this helps,
Ludovic.

Ludovic Courtès <civodul>
Project Administrator
Tue 05 Jun 2007 10:27:30 AM UTC, original submission:

In my guile 1.3.4 (sorry that I do not have a more up-to-date version to play with):

(let ((handler-called #f))
(sigaction SIGALRM (lambda (sig) (set! handler-called #t)))
(raise SIGALRM)
handler-called)
=> #t

in guile 1.8.1 it returns false. I've tried getting sigaction to display to a port, etc., and it seems simply not to call the lambda. It's as if sigaction set the action to SIG_IGN instead of my lambda, except that when I query sigaction I get the appropriate (#<procedure #f (sig)> . 2), not (1 . 2). This is only slightly different from 1.3.4, where the result of the subsequent sigaction call is (#<procedure (sig)> . 268435456) --- what is the significance of the new #f? Is this a bug, or am I using sigaction wrong?

Thanks,
Grem

Gregory Marton <gremio>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by civodul (Posted a comment)
  • -unavailable- added by gremio (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 06 Jun 2007 07:44:47 AM UTCcivodulOpen/ClosedOpen=>Closed
    Tue 05 Jun 2007 10:27:30 AM UTCgremioCarbon-Copy-=>Added gremio

    Back to the top


    Powered by Savane 3.1-cleanup1