-
Notifications
You must be signed in to change notification settings - Fork 273
Open
Description
For example, this program hangs unless I remove the call to signal function.
#include <signal.h>
#include <sys/wait.h>
#include <unistd.h>
int main(void) {
signal(SIGCHLD, SIG_IGN);
pid_t pid = fork();
if (pid == 0) {
const char *argv[] = {
"/usr/bin/bwrap",
"--ro-bind", "/", "/",
"--proc", "/proc",
"/usr/bin/true",
NULL
};
execv(argv[0], (char * const *)argv);
}
waitpid(pid, NULL, 0);
return 0;
}A real-world case is:
- gcin, the affected application, uses
signal(SIGCHLD, SIG_IGN); - gcin eventually uses glycin library
- glycin uses bwrap
From gdb, bwrap is stuck in monitor_child. A fix might be using SIG_DFL for SIGCHLD before executing a process.
Metadata
Metadata
Assignees
Labels
No labels