summaryrefslogtreecommitdiffstats
path: root/cmd-new-session.c
diff options
context:
space:
mode:
authornicm <nicm>2019-06-03 18:28:37 +0000
committernicm <nicm>2019-06-03 18:28:37 +0000
commit4ca1de1b8bc10dca47d2cf7399df41845c902c9e (patch)
tree72457b8c867aebb24f83cf68f6b6f09387aa598a /cmd-new-session.c
parent900238a30657a477f3c62ba344fcc73fc0948ac7 (diff)
Add new-session -X and attach-session -x to send SIGHUP to parent when
detaching (like detach-client -P). From Colin Watson in GitHub issue 1773.
Diffstat (limited to 'cmd-new-session.c')
-rw-r--r--cmd-new-session.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/cmd-new-session.c b/cmd-new-session.c
index 559c268c..e0540815 100644
--- a/cmd-new-session.c
+++ b/cmd-new-session.c
@@ -39,8 +39,8 @@ const struct cmd_entry cmd_new_session_entry = {
.name = "new-session",
.alias = "new",
- .args = { "Ac:dDEF:n:Ps:t:x:y:", 0, -1 },
- .usage = "[-AdDEP] [-c start-directory] [-F format] [-n window-name] "
+ .args = { "Ac:dDEF:n:Ps:t:x:Xy:", 0, -1 },
+ .usage = "[-AdDEPX] [-c start-directory] [-F format] [-n window-name] "
"[-s session-name] " CMD_TARGET_SESSION_USAGE " [-x width] "
"[-y height] [command]",
@@ -105,7 +105,8 @@ cmd_new_session_exec(struct cmd *self, struct cmdq_item *item)
if (args_has(args, 'A')) {
retval = cmd_attach_session(item,
newname, args_has(args, 'D'),
- 0, NULL, args_has(args, 'E'));
+ args_has(args, 'X'), 0, NULL,
+ args_has(args, 'E'));
free(newname);
return (retval);
}