GNU bug report logs -
#46403
SIGINT ignored when using system*
Previous Next
Full log
View this message in rfc822 format
I execute commands in a loop and wish to be able to interrupt the loop
with SIGINT. Here’s the first attempt:
guile -c \
'(for-each (lambda (n)
(display n)
(system* "sleep" "3"))
(list 1 2 3 4))'
At no point will this program be interrupted by SIGINT. Strace reveals
that SIGINT is in fact received and the sleep is interrupted, but the
wait is restarted immediately afterward.
This program on the other hand *can* be interrupted at any point:
guile -c \
'(for-each (lambda (n)
(if (zero? (primitive-fork))
(begin (display n)
(execlp "sleep" "sleep" "3"))
(waitpid WAIT_ANY)))
(list 1 2 3 4))'
Is this by design?
--
Ricardo
This bug report was last modified 4 years and 44 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.