Closed bgamari closed 2 years ago
Cc @blackgnezdo
To confirm, a trivial C program behaves as expected:
#include <unistd.h>
#include <signal.h>
int main() {
kill(getpid(), SIGINT);
sleep(1);
return 0;
}
Namely,
$ (gcc hi.c; ./a.out; echo $?)
130
Can we guard this behavior behind CPP or revert the patch? Being broken on debian 10 seems worse than being broken on OpenBSD. (Of course working on both would be beneficial but we are not blocked on OpenBSD issues).
My sense is that the right approach here is to use neither Python nor sh
. Rather, we can just use the C program I gave above.
I'll take a look but do feel free to revert my change if you want to make a quick release.
Yes, @bgamari a C program would've been my preferred fix except I didn't understand how to to fit this into the test harness.
@blackgnezdo no worries. I have put up a plausible fix as #242.
It appears that the refactor of
process011
performed in 8cd7e043b8b55cca398ce4c3c3880aff3af62975, whereprocess011
is taught to usepython3
instead ofsh
, has broken the test on Debian 10. Specifically, for reasons that I don't yet understandpython3
exits with code 1 not code 2 when killing itself with signal 2: