From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24404 invoked by alias); 4 Apr 2015 20:52:27 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 20090 Received: (qmail 13191 invoked from network); 4 Apr 2015 20:52:25 -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 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:message-id:date:in-reply-to:comments :references:to:subject:mime-version:content-type; bh=JpqPIb6O8lRLW44On+Gc/1p61LXid1dWo32guYaCLZc=; b=flxOx00tiLyRVvFcQ/IBBGBMZ7jwXQwIv64A6vgpeWZdbIshjhxrpYaSMVHgHP7oLP RWtXiuchK24GzlfXXBcPnVgjWD7Q6TN8TMtNmK9+ZCACtIMNgC59gJI0UqweESK9IpO6 NtDYN5VXU8UE2cepvHAMgxudNhC/e2LtcFMciMsXuAOvLG63gQbeJVbMA8Wekv4Gox86 +d6M9xpRRB1NRAaBlwMkLM1AcdpM1DIpM2JKfqjzrWzyuN+BjOAaMoVnR5ouf6GwmXV/ 5qndMxj5BvSH4kWOn97vZc+u2Qgek5KMIcywd4tKVxk39FhrbK2VJUfEiss3YaEDym9P dqfw== X-Gm-Message-State: ALoCoQl5/E7HyOrzDvqQhVizU9UoG+VNmnh+CWDO5uJ+UCSTqclvTwCoben7XNECtrpzegQ7BDm3 X-Received: by 10.60.52.170 with SMTP id u10mr9286312oeo.55.1428180743840; Sat, 04 Apr 2015 13:52:23 -0700 (PDT) From: Bart Schaefer Message-Id: <150404135220.ZM14983@torch.brasslantern.com> Date: Sat, 4 Apr 2015 13:52:20 -0700 In-Reply-To: Comments: In reply to Thorsten Kampe "Re: How to trap EXIT like in bash" (Apr 4, 10:45pm) References: <1428167314.5875.2.camel@niobium.home.fifi.org> <150404114859.ZM14898@torch.brasslantern.com> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-users@zsh.org Subject: Re: How to trap EXIT like in bash MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Apr 4, 10:45pm, Thorsten Kampe wrote: } } It gets even weirder: neither `kill -HUP`, nor `kill -INT` nor `kill } -TERM` with the PID of the shell have any influence on the script if } these signals are trapped. What does have an influence is a Ctrl-C } and `kill -KILL`. This is still NO_TRAPS_ASYNC. Ctrl-C from the terminal is sent to the whole process group, so both zsh and the child get the signal and the trap is run effectively immediately (because the child has exited). KILL isn't trappable, so zsh can't delay handling that.