Added exec
This commit is contained in:
parent
c783cb9290
commit
7b8b64ca04
1 changed files with 4 additions and 0 deletions
|
@ -65,6 +65,10 @@ handle_ipc_event(char *msg)
|
||||||
g_is_about_to_quit = true;
|
g_is_about_to_quit = true;
|
||||||
} else if (STREQ(command, "reload")) {
|
} else if (STREQ(command, "reload")) {
|
||||||
exec_config();
|
exec_config();
|
||||||
|
} else if (STREQ(command, "exec")) {
|
||||||
|
char *command = strtok(NULL, "");
|
||||||
|
execl("/bin/sh", "/bin/sh", "-c", command, NULL);
|
||||||
|
g_is_about_to_quit = true;
|
||||||
} else {
|
} else {
|
||||||
warn("ignoring unknown command: %s\n", command);
|
warn("ignoring unknown command: %s\n", command);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue