From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21866 invoked by alias); 19 Aug 2010 22:24:02 -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: 28173 Received: (qmail 21480 invoked from network); 19 Aug 2010 22:23:59 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-0.4 required=5.0 tests=BAYES_00,FAKE_REPLY_C autolearn=ham version=3.3.1 Received-SPF: pass (ns1.primenet.com.au: SPF record at spf.stack.nl designates 131.155.140.107 as permitted sender) Date: Fri, 20 Aug 2010 00:14:42 +0200 From: Jilles Tjoelker To: Peter Stephenson , zsh-workers@zsh.org Cc: 593426@bugs.debian.org Subject: Re: Bug#593426: zsh: Status of background jobs not updated Message-ID: <20100819221442.GA95791@stack.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) > [continuing a stopped background job using kill is not reflected in the > output of jobs] I think hooking into the kill builtin is the wrong way to fix this. Instead, use the facilities provided by modern systems which can notify you if a child process continues. These are si_code CLD_CONTINUED for SIGCHLD and the WCONTINUED flag and WIFCONTINUED() macro for waitpid(). Some systems do not provide these, and may not even provide queuing and siginfo for SIGCHLD, so the latter approach seems best. The WCONTINUED stuff can then be #ifdef'ed out for systems that do not support it. -- Jilles Tjoelker