From owner-freebsd-bugs Sun Sep 2 22:44:44 2001 Delivered-To: freebsd-bugs@freebsd.org Received: from goliath.siemens.de (goliath.siemens.de [194.138.37.131]) by hub.freebsd.org (Postfix) with ESMTP id 62A6737B406; Sun, 2 Sep 2001 22:44:40 -0700 (PDT) X-Envelope-Sender-Is: andre.albsmeier@mchp.siemens.de (at relayer goliath.siemens.de) Received: from mail1.siemens.de (mail1.siemens.de [139.23.33.14]) by goliath.siemens.de (8.11.1/8.11.1) with ESMTP id f835icb25213; Mon, 3 Sep 2001 07:44:39 +0200 (MET DST) Received: from curry.mchp.siemens.de (curry.mchp.siemens.de [139.25.42.7]) by mail1.siemens.de (8.11.6/8.11.6) with ESMTP id f835icx06472; Mon, 3 Sep 2001 07:44:38 +0200 (MET DST) Received: (from localhost) by curry.mchp.siemens.de (8.11.6/8.11.6) id f835icL73007; Date: Mon, 3 Sep 2001 07:44:38 +0200 From: Andre Albsmeier To: jon@FreeBSD.org Cc: andre.albsmeier@mchp.siemens.de, freebsd-bugs@FreeBSD.org, cracauer@FreeBSD.org Subject: Re: bin/24591: jobs command differs in interactive vs. non-interactive /bin/sh Message-ID: <20010903074438.A40750@curry.mchp.siemens.de> References: <200109022320.f82NK9G13771@freefall.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200109022320.f82NK9G13771@freefall.freebsd.org>; from jon@FreeBSD.org on Sun, Sep 02, 2001 at 04:20:09PM -0700 X-Echelon: BND CIA NSA Mossad KGB MI6 IRA detonator nuclear assault strike Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org [ CC'ing Martin Cracauer...] On Sun, 02-Sep-2001 at 16:20:09 -0700, jon@FreeBSD.org wrote: > Synopsis: jobs command differs in interactive vs. non-interactive /bin/sh > > State-Changed-From-To: open->closed > State-Changed-By: jon > State-Changed-When: Sun Sep 2 16:16:45 PDT 2001 > State-Changed-Why: > If you want a shell that behaves the same way as an interactive shell, > start sh with the -i flag. Thanks for the explanation. > > The reason this does not work in non-interactive mode is because the command > string is not stored unless the shell is an interactive root shell. > See jobs.c line 678: > if (iflag && rootshell && n) > ps->cmd = commandtext(n); > Hmm, so I have to ask myself why it needs the iflag to store the commandtext... -Andre To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message