From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5439 invoked from network); 28 Oct 2006 17:51:39 -0000 X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00, FORGED_RCVD_HELO autolearn=ham version=3.1.7 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 28 Oct 2006 17:51:39 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 94416 invoked from network); 28 Oct 2006 17:51:32 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 28 Oct 2006 17:51:32 -0000 Received: (qmail 11114 invoked by alias); 28 Oct 2006 17:51:26 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 22915 Received: (qmail 11105 invoked from network); 28 Oct 2006 17:51:25 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 28 Oct 2006 17:51:25 -0000 Received: (qmail 93734 invoked from network); 28 Oct 2006 17:51:25 -0000 Received: from vms046pub.verizon.net (206.46.252.46) by a.mx.sunsite.dk with SMTP; 28 Oct 2006 17:51:23 -0000 Received: from torch.brasslantern.com ([71.116.118.106]) by vms046.mailsrvcs.net (Sun Java System Messaging Server 6.2-4.02 (built Sep 9 2005)) with ESMTPA id <0J7U00JI2XLK5ZD8@vms046.mailsrvcs.net> for zsh-workers@sunsite.dk; Sat, 28 Oct 2006 12:51:21 -0500 (CDT) Received: from torch.brasslantern.com (localhost.localdomain [127.0.0.1]) by torch.brasslantern.com (8.13.1/8.13.1) with ESMTP id k9SHpJ4g031032 for ; Sat, 28 Oct 2006 10:51:20 -0700 Received: (from schaefer@localhost) by torch.brasslantern.com (8.13.1/8.13.1/Submit) id k9SHpJYe031031 for zsh-workers@sunsite.dk; Sat, 28 Oct 2006 10:51:19 -0700 Date: Sat, 28 Oct 2006 10:51:19 -0700 From: Bart Schaefer Subject: Re: PATCH: $! on bg In-reply-to: <200610261739.k9QHd4PN023579@news01.csr.com> To: zsh-workers@sunsite.dk (Zsh hackers list) Message-id: <061028105119.ZM31030@torch.brasslantern.com> MIME-version: 1.0 X-Mailer: OpenZMail Classic (0.9.2 24April2005) Content-type: text/plain; charset=us-ascii References: <200610261739.k9QHd4PN023579@news01.csr.com> Comments: In reply to Peter Stephenson "PATCH: $! on bg" (Oct 26, 6:39pm) On Oct 26, 6:39pm, Peter Stephenson wrote: } } It's hard to see any compatilibity problems arising with this since bg } is mostly used at the command line, but maybe Bart or someone else can } think of problems. The only case where this could possibly cause confusion is if someone has deliberately started a non-interactive shell with "setopt monitor". I don't think that's frequent enough, or the resulting problem severe enough, to worry about. } I haven't attempted to lever this into Sven's hack whereby the } shell can fork and allow you to put a job that was running } into the current shell into the background; however, it "might just } work", since the fudged job should already be in the job table by the } time you do "bg". No, it does not appear to work. Try e.g. zsh% while sleep 10; do : ; done ^Z zsh: suspended while sleep 10; do; :; done zsh% bg ; echo $! 0 zsh%