[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#46403: SIGINT ignored when using system*
From: |
Ricardo Wurmus |
Subject: |
bug#46403: SIGINT ignored when using system* |
Date: |
Tue, 09 Feb 2021 14:56:06 +0100 |
User-agent: |
mu4e 1.4.14; emacs 27.1 |
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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- bug#46403: SIGINT ignored when using system*,
Ricardo Wurmus <=