Skip to content

env: reraise signal from child process#4011

Merged
sylvestre merged 1 commit intouutils:mainfrom
tertsdiepraam:env-signal-handling
Oct 13, 2022
Merged

env: reraise signal from child process#4011
sylvestre merged 1 commit intouutils:mainfrom
tertsdiepraam:env-signal-handling

Conversation

@tertsdiepraam
Copy link
Collaborator

@tertsdiepraam tertsdiepraam commented Oct 8, 2022

Closes #3188

This PR reraises any signals from the child process instead of printing them. This is more in line with GNU behaviour. The message that we previously printed was actually not GNU behaviour, but part of the shell.

I'm not sure how to test this in the CI. I need to spawn a child process that raises a signal to respond to. In normal testing I used a custom C program, but I'm not sure how to get that compiled in the CI:

#include <signal.h>
#include <stdlib.h>

int main(int argc, char** argv) {
    raise(atoi(argv[1]));
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

env: unwrap panick when called program exited with SIGSEGV

2 participants