diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2014-03-11 11:18:07 +0100 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2014-03-11 17:49:49 +0100 |
commit | 2527c282c378f7401c0adb80221b691582b84989 (patch) | |
tree | 60eda991b57f9a0f67ccf0b1671b5859a941547f | |
parent | 3f50356a14f299c57ef9b164c0c5a1c1321d5699 (diff) | |
download | weechat-2527c282c378f7401c0adb80221b691582b84989.zip |
exec: implement options -signal/-kill/-killall in command /exec
-rw-r--r-- | src/plugins/exec/exec-command.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/plugins/exec/exec-command.c b/src/plugins/exec/exec-command.c index 0f07e02c6..016541e3f 100644 --- a/src/plugins/exec/exec-command.c +++ b/src/plugins/exec/exec-command.c @@ -218,9 +218,7 @@ exec_command_exec (void *data, struct t_gui_buffer *buffer, int argc, return WEECHAT_RC_ERROR; ptr_exec_cmd = exec_command_search_running_id (argv[2]); if (ptr_exec_cmd) - { - /* TODO: send signal to the process */ - } + weechat_hook_set (ptr_exec_cmd->hook, "signal", argv[3]); return WEECHAT_RC_OK; } @@ -231,9 +229,7 @@ exec_command_exec (void *data, struct t_gui_buffer *buffer, int argc, return WEECHAT_RC_ERROR; ptr_exec_cmd = exec_command_search_running_id (argv[2]); if (ptr_exec_cmd) - { - /* TODO: send KILL signal to the process */ - } + weechat_hook_set (ptr_exec_cmd->hook, "signal", "kill"); return WEECHAT_RC_OK; } @@ -243,7 +239,10 @@ exec_command_exec (void *data, struct t_gui_buffer *buffer, int argc, for (ptr_exec_cmd = exec_cmds; ptr_exec_cmd; ptr_exec_cmd = ptr_exec_cmd->next_cmd) { - /* TODO: send KILL signal to the process */ + if (ptr_exec_cmd->hook) + { + weechat_hook_set (ptr_exec_cmd->hook, "signal", "kill"); + } } return WEECHAT_RC_OK; } |