From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17909 invoked by alias); 16 Apr 2016 08:10:17 -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: 38290 Received: (qmail 27784 invoked from network); 16 Apr 2016 08:10:15 -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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.1 Date: Sat, 16 Apr 2016 00:59:41 -0700 From: frederik@ofb.net To: zsh-workers@zsh.org Subject: exec redirect prevents trap Message-ID: <20160416075941.GA27994@ofb.net> Reply-To: frederik@ofb.net MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) Sender: Dear Zsh Workers, I have a script like this: #!/bin/zsh exec > >(tee -a /tmp/foo) trap "echo hi" INT TERM EXIT sleep 1d; When I run it and hit ^C, it doesn't print anything. But when I remove the "exec" line and do the same, it prints "hi". I would have expected it to print "hi" both times. - is this a bug? - is there a way to get the trap to execute, even with the exec line present? Thank you, Frederick Eaton