Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH] Remove zpty exit hook from forked processes
- X-seq: zsh-workers 40483
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Eric Freese <ericdfreese@xxxxxxxxx>, zsh-workers@xxxxxxx
- Subject: Re: [PATCH] Remove zpty exit hook from forked processes
- Date: Wed, 1 Feb 2017 16:56:13 -0800
- Authentication-results: amavisd4.gkg.net (amavisd-new); dkim=pass (2048-bit key) header.d=brasslantern-com.20150623.gappssmtp.com
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version; bh=fmAcjFcsTQCXeQjeCFeRiHRXBWNAHdzc0X0rkTjWjO0=; b=G8P/RhQw9eHA6NABr/CAw5TDlonoWmHaDfgA7Krw57woUf7mAuY70Y+uCmhlwRAJWH mz4rosQZQhShuqjpKHnHUdcWiP3MUfdt4NBqaduFQGQK8Z+pLfmBR8mVGRKDIZUEQbyx 5joaEFo1l2mOq6pTolLAYDgw8i5rEAH8pKdumtOUTGE8p4iRMV/jYG/xkrhROTZxpwRS jWIs7LQLNPxujT6Sl/bQeJgAUbq5Irp6WzbmTjHiV2xYIUO/Cj3pJVZGzpC6W69oUcu9 T9qq18xTJTGjQuQ5DtEJCZi9FL8AO5K38vmPGsJYEQs8ezyRjIkguqakYXpc+mJ+hxcE wSzw==
- In-reply-to: <20170201204114.53246-1-ericdfreese@gmail.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <20170201204114.53246-1-ericdfreese@gmail.com>
On Feb 1, 1:41pm, Eric Freese wrote:
}
} diff --git a/Src/Modules/zpty.c b/Src/Modules/zpty.c
If the only meaningful diff is this one ...
} + deletehookfunc("exit", ptyhook);
} clearjobtab(0);
... then there is no reason to move around all those static functions.
Just mark the one to be declared in the autogenerated header file.
diff --git a/Src/Modules/zpty.c b/Src/Modules/zpty.c
index 2c87be1..3c1bef5 100644
--- a/Src/Modules/zpty.c
+++ b/Src/Modules/zpty.c
@@ -331,6 +331,7 @@ newptycmd(char *nam, char *pname, char **args, int echo, int nblock)
/* This code copied from the clone module, except for getting *
* the descriptor from get_pty() and duplicating it to 0/1/2. */
+ deletehookfunc("exit", ptyhook);
clearjobtab(0);
ppid = getppid();
mypid = getpid();
@@ -852,6 +853,7 @@ bin_zpty(char *nam, char **args, Options ops, UNUSED(int func))
}
}
+/**/
static int
ptyhook(UNUSED(Hookdef d), UNUSED(void *dummy))
{
Messages sorted by:
Reverse Date,
Date,
Thread,
Author