diff --git a/.github/workflows/bsd.yml b/.github/workflows/bsd.yml index 80095d4..9910161 100644 --- a/.github/workflows/bsd.yml +++ b/.github/workflows/bsd.yml @@ -51,8 +51,7 @@ jobs: for n in `seq 15`; do ./a.out || echo $?; done uname -a echo BARRIER1 - cc -DREBLOCK -Wall -xc pending_signal_c ||true - for n in `seq 15`; do ./a.out || echo $?; done + for n in `seq 15`; do RAISE_AFTER_EXEC=1 ./a.out || echo $?; done echo BARRIER2 perl Makefile.PL make diff --git a/pending_signal_c b/pending_signal_c index 59128e1..d5486d8 100644 --- a/pending_signal_c +++ b/pending_signal_c @@ -38,11 +38,18 @@ int main(int argc, char **argv) } else { - char msg[] = "reached write()\n"; - if (getenv("RAISE_AFTER_EXEC")) + { + char msg[] = "reached write() w/ RAISE_AFTER_EXEC\n"; + raise(SIGTERM); - write(2, msg, sizeof(msg) - 1); + write(2, msg, sizeof(msg) - 1); + } + else + { + char msg[] = "reached write()\n"; + write(2, msg, sizeof(msg) - 1); + } sigpending(&set); return sigismember(&set, SIGTERM) ? 1 : 2; }