Taught multiwatch to send the correct signal when using --signal
When the --signal flag was enabled, multiwatch was sending the index of signal in the sig_actions array instead of the correct signal number. So, when multiwatch was told to send a SIGTERM, the application was actually being sent a SIGQUIT, which caused the application to coredump as ordered. The fix is to change the loop to return the signal number stored at the index.master
parent
d3a960fbe0
commit
bdd50b7910
|
@ -94,7 +94,7 @@ static gint signame2num(const char *name) {
|
|||
|
||||
for (i = 0; signal_actions[i].signame; i++) {
|
||||
if (0 == strcmp(signal_actions[i].signame, name)) {
|
||||
return i;
|
||||
return signal_actions[i].signum;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue