From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14722 invoked by alias); 25 Oct 2012 10:27:46 -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: 30752 Received: (qmail 10561 invoked from network); 25 Oct 2012 10:27:43 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 Received-SPF: neutral (ns1.primenet.com.au: 74.125.83.43 is neither permitted nor denied by SPF record at ntlworld.com) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-proxyuser-ip:date:from:to:subject:message-id:in-reply-to :references:x-mailer:mime-version:content-type :content-transfer-encoding:x-gm-message-state; bh=F1TXhTNo7lfU0nvRkQHNrRCGcyJ7Fom9jMNVCihdfpY=; b=Q21sPSoEQtZLhvpYtF2Jab1OLhZHHIkKcq9rY7vU3+q8A4mWGpy2k4ChRZ8PnSC+bg 0gLzUw0UxRvjRCNrLW60wJi9ZR3eyLi04a2dzE6bdrpKtHpoYLEnVZYJn4zggaV3l5EH oW8TZrSHRFV+uL1zzxAWVSjL210th5/+6WdcP528p/RVCShEMryiJ/7b5Q+in8zOwXX/ TBZj2d+912p9hAQnnk96OJulsjHz6vA9Y2ifGxZnVd3ahl1kJ5Zgr9AG+Z4fwZzmRm7r TwKg15uUe0ZgzTMeBvfPau4z5H4lqfX/ZfQFgnoPWV2JoK1X9G3F77n8nFHwpCGw+qui Efog== X-ProxyUser-IP: 82.8.55.192 Date: Thu, 25 Oct 2012 11:22:22 +0100 From: Peter Stephenson To: zsh-workers@zsh.org Subject: Re: Commands run from functions don't exit cleanly on terminal close (SIGHUP)? Message-ID: <20121025112222.3dfbb213@pws-pc.ntlworld.com> In-Reply-To: <909858C7-4B5A-4679-90B3-6BF5398BA9FC@mac.com> References: <2B813FB0-0877-42BA-974C-1A142EF09BCE@mac.com> <909858C7-4B5A-4679-90B3-6BF5398BA9FC@mac.com> X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.7; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Gm-Message-State: ALoCoQn39Z1MmSG8W5X6aYwMW9Lry0wKoxewDUF9LdD6gQanIQi7JiH3mEmHH5oLPzMT2b/TIsH6 On Wed, 24 Oct 2012 10:10:42 -0400 Alan Pinstein wrote: > I need to make one clarification; the PPID ends up as 1 (orphaned) if > no traps are installed; if the HUP trap is installed, the PPID remains > correct, but it still doesn't exit. In my case (Fedora 15 on x86_64), I'm seeing the programme exit if there aren't any traps, so I've got different behaviour. This could be as the result of a race or indeed pretty much anything else... With the HUP trap, it's not exiting, but that doesn't actually surprise me: you're handling the trap within the shell, so it's not being propagated as a signal to PHP. There are lots of variables, I'll try to experiment some more, in particular finding differences between the behaviour in functions and not (which wouldn't surprise me, there is some special handling). pws