From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6208 invoked by alias); 3 Feb 2017 16:27:40 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 40491 Received: (qmail 8525 invoked from network); 3 Feb 2017 16:27:40 -0000 X-Qmail-Scanner-Diagnostics: from mail-qk0-f193.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(209.85.220.193):SA:0(0.5/5.0):. Processed in 1.517293 secs); 03 Feb 2017 16:27:40 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=0.5 required=5.0 tests=DATE_IN_PAST_24_48, FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_PASS,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.1 X-Envelope-From: ericdfreese@gmail.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.220.193 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=a5E9PzjIkutSHjcpJhsSHFyeixlhEjQ0geqPLsLgibU=; b=DJNIHeChP3DVHaBIptfjbqwO1hmDrsl8h/yR++SmkcYQa17t8oplM582L6uSV2e5Tg 3uKB9ksO+60MHElkcR0fLZgnRoKNFXolSSkIgzCF8IjQtYBq9X42qESiQUs2M27kPoKv sNXhFaS6+J7Bw8LNbO7Vswfh4HUA9j/byMAjUh4wDgw9qOXl2mK3TqHORI825dD8L9Gc MHgjLOzXHBxiyOyIDKmfmtGhl64le9+spfpwb4Rm9PtVpT/akEYZUc59fcN/IIa3YZV8 M5YpjDMrnW8inOT8E/ggRRnA+Yuy40fk9qas5zjejH0DM+kQ8479NB7Axyle1hsC0sKW IVdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=a5E9PzjIkutSHjcpJhsSHFyeixlhEjQ0geqPLsLgibU=; b=L4fwazhgFW5X1ZvVi5aIHsKN7kcvLcElg5dVH5EvB7Jrl8s/uu6FrHgOsj+Ww8U7Fl c1oB7Mudo1N/YfxRLiQmHLxCZvdDBP6ahckEqUnT6KYS2p0VqM8ojcMeILT2Gw/Qerj9 8cmYWLcFbkLPnDTMismSY4xY6S3Np8sF8VXFA0vTDnBbGN2Je4lQxg9FSyl6J1drzhvh qlxzV1ofhYL9QsLZQgOikS2mjFn+juQqrzPFASpuRUkSUEEzctIngS/mRz6KEC2opbLp ObR1FHAvg5gXXzR9ybCB1ovvQqw+Ne82C9j0h6rYfTUUmRRhaw2rO0e2opV3F82cjdai Bfsw== X-Gm-Message-State: AIkVDXLSqCwl1WKDM7inGn+KXAaL4nm6uMUI/1wMyHxHF1aHGxLAh2y9X74+oeRmEa/tElZnJr1IznAtQMqZtw== X-Received: by 10.55.207.65 with SMTP id e62mr6091537qkj.239.1485998773239; Wed, 01 Feb 2017 17:26:13 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <170201165613.ZM2163@torch.brasslantern.com> References: <20170201204114.53246-1-ericdfreese@gmail.com> <170201165613.ZM2163@torch.brasslantern.com> From: Eric Freese Date: Wed, 1 Feb 2017 18:25:52 -0700 Message-ID: Subject: Re: [PATCH] Remove zpty exit hook from forked processes To: Bart Schaefer Cc: zsh-workers@zsh.org Content-Type: multipart/alternative; boundary=001a1145a86e0414cb0547820d07 --001a1145a86e0414cb0547820d07 Content-Type: text/plain; charset=UTF-8 Ok, here's an updated patch. --- Src/Modules/zpty.c | 2 ++ 1 file changed, 2 insertions(+) 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)) { -- On Wed, Feb 1, 2017 at 5:56 PM, Bart Schaefer wrote: > > 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)) > { --001a1145a86e0414cb0547820d07--