From owner-freebsd-bugs Sun Sep 2 16:26:29 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 21F9F37B40C; Sun, 2 Sep 2001 16:26:20 -0700 (PDT) Received: (from jon@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id f82NK9G13771; Sun, 2 Sep 2001 16:20:09 -0700 (PDT) (envelope-from jon) Date: Sun, 2 Sep 2001 16:20:09 -0700 (PDT) From: Message-Id: <200109022320.f82NK9G13771@freefall.freebsd.org> To: andre.albsmeier@mchp.siemens.de, jon@FreeBSD.org, freebsd-bugs@FreeBSD.org Subject: Re: bin/24591: jobs command differs in interactive vs. non-interactive /bin/sh 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 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. 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); http://www.FreeBSD.org/cgi/query-pr.cgi?pr=24591 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message