summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/cmd-kill-server.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2014-01-27 23:57:36 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2014-01-27 23:57:36 +0000
commitb8acb96b8cbcd96830982b2de98b43f93e0ef785 (patch)
treefbaa70e68e1363e271b66e3937edbc5c864ac302 /usr.bin/tmux/cmd-kill-server.c
parent55ec9589c32573aa197af2baf563e49a4bd438cb (diff)
Merge start-server into kill-server.
Diffstat (limited to 'usr.bin/tmux/cmd-kill-server.c')
-rw-r--r--usr.bin/tmux/cmd-kill-server.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/usr.bin/tmux/cmd-kill-server.c b/usr.bin/tmux/cmd-kill-server.c
index 15a1476af7a..31e179b88c7 100644
--- a/usr.bin/tmux/cmd-kill-server.c
+++ b/usr.bin/tmux/cmd-kill-server.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-kill-server.c,v 1.11 2013/10/10 12:00:20 nicm Exp $ */
+/* $OpenBSD: cmd-kill-server.c,v 1.12 2014/01/27 23:57:35 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -38,10 +38,20 @@ const struct cmd_entry cmd_kill_server_entry = {
cmd_kill_server_exec
};
+const struct cmd_entry cmd_start_server_entry = {
+ "start-server", "start",
+ "", 0, 0,
+ "",
+ CMD_STARTSERVER,
+ NULL,
+ cmd_kill_server_exec
+};
+
enum cmd_retval
-cmd_kill_server_exec(unused struct cmd *self, unused struct cmd_q *cmdq)
+cmd_kill_server_exec(struct cmd *self, unused struct cmd_q *cmdq)
{
- kill(getpid(), SIGTERM);
+ if (self->entry == &cmd_kill_server_entry)
+ kill(getpid(), SIGTERM);
return (CMD_RETURN_NORMAL);
}