Ah, so the segfault also occurs with plain old `cat` then? I think we can close this bug ;) Thanks for tracking this down further.
On Jun 23, 2013, at 7:14, Moritz Wilhelmy <mor...@wzff.de> wrote: > On 21.06.2013 22:34, John Cowan wrote: >> I can confirm that on 32-bit Linux. On Cygwin, however, typing ^\ does >> trigger a SIGSEGV with dumped core (except that it doesn't actually dump >> core because the Windows kernel can't do that). Both systems are running >> version 4.8.2 (rev ea02c9a), and there is no .csirc file. Readline is >> not involved: the config line says "manyargs dload ptables" only. > > Right. > > $ cat > ^\ > Segmentation fault (core dumped) > > But: > $ cat test.c > #include <stdio.h> > #include <signal.h> > #include <unistd.h> > > void sighandler(int sig) > { > printf("Caught signal: %d\n", sig); > } > > main() > { > struct sigaction s; > memset(&s, 0, sizeof(s)); > s.sa_handler = sighandler; > > sigaction(SIGSEGV, &s, 0); > sigaction(SIGQUIT, &s, 0); > > while (1) > sleep(1); > > return 0; > } > $ ./test & > [2] 3720 > $ kill -QUIT %2 > Caught signal: 3 > $ kill -SEGV %2 > Caught signal: 11 > $ ./test > ^\ > Caught signal: 3 > > If you comment out sigaction(SIGQUIT, &s, 0); it prints > Segmentation fault (core dumped) > although it is actually killed by SIGQUIT, not SIGSEGV. > > This leads me to believe that something inside Cygwin just prints the > wrong string for some reason, like for instance Windows or Cygwin > returning a bogus value for WTERMSIG in the wait-syscall the shell > makes, and that this is not a Chicken bug. > > However, this puzzles me: > $ find >/dev/null > ^\ > Quit (core dumped) > $ cat >/dev/null > ^\ > Segmentation fault (core dumped) > $ cat /dev/zero >/dev/null > ^\ > Quit (core dumped) > > So it might be that processes which are killed while doing I/O print > "Quit" and "Segmentation fault" otherwise. > > > Best regards, > > Moritz > > _______________________________________________ > Chicken-users mailing list > Chicken-users@nongnu.org > https://lists.nongnu.org/mailman/listinfo/chicken-users _______________________________________________ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users