GNU bug report logs -
#73589
system* does not honor SIGINT restoration in child
Previous Next
Full log
Message #10 received at 73589-done <at> debbugs.gnu.org (full text, mbox):
Hi,
Olivier Dion <olivier.dion <at> polymtl.ca> skribis:
> and its ouput from various executions:
>
> 1) $ ./a.out => (nil) 0x1 (nil)
> 2) $ guile -c '(system "./a.out")' => (nil) 0x1 (nil)
> 3) $ guile -c '(system* "./a.out")' => 0x1 0x1 (nil)
>
> We can see that 3) does not honor restoration of `SIGINT' to `SIG_DFL'
> like `system(3)' does. This seems to be because of the following
> sigaction before the creation of the process:
>
> 1697 scm_dynwind_sigaction (SIGINT,
> 1698 scm_from_uintptr_t ((uintptr_t) SIG_IGN),
> 1699 SCM_UNDEFINED);
> 1700 #ifdef SIGQUIT
> 1701 scm_dynwind_sigaction (SIGQUIT,
> 1702 scm_from_uintptr_t ((uintptr_t) SIG_IGN),
> 1703 SCM_UNDEFINED);
> 1704 #endif
> 1705
> 1706 err = piped_process (&pid, prog, args,
> 1707 SCM_UNDEFINED, SCM_UNDEFINED);
This was fixed in commit 4ae33f76d6b33ea0bedfa36050d44c88d08c2823, which
is included in 3.0.10:
--8<---------------cut here---------------start------------->8---
$ cat t.c
#include <stdio.h>
#include <signal.h>
int main(void)
{
struct sigaction act;
sigaction(SIGINT, NULL, &act);
printf("%p %p %p\n", act.sa_handler, SIG_IGN, SIG_DFL);
}
$ gcc -Wall t.c
$ ./a.out
(nil) 0x1 (nil)
$ ./meta/guile -c '(system "./a.out")'
(nil) 0x1 (nil)
$ ./meta/guile -c '(system* "./a.out")'
(nil) 0x1 (nil)
--8<---------------cut here---------------end--------------->8---
Ludo’.
This bug report was last modified 247 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.