Browse Source

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
Tyler Stubenvoll 1 year ago
parent
commit
bdd50b7910
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      multiwatch.c

+ 1
- 1
multiwatch.c View File

@@ -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…
Cancel
Save