From owner-freebsd-bugs Tue Jan 23 22:50:20 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 14CEA37B402 for ; Tue, 23 Jan 2001 22:50:01 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.1/8.11.1) id f0O6o1T75278; Tue, 23 Jan 2001 22:50:01 -0800 (PST) (envelope-from gnats) Received: from goliath.siemens.de (goliath.siemens.de [194.138.37.131]) by hub.freebsd.org (Postfix) with ESMTP id 97FB337B402 for ; Tue, 23 Jan 2001 22:41:54 -0800 (PST) Received: from mail3.siemens.de (mail3.siemens.de [139.25.208.14]) by goliath.siemens.de (8.11.0/8.11.0) with ESMTP id f0O6foC24442 for ; Wed, 24 Jan 2001 07:41:51 +0100 (MET) Received: from curry.mchp.siemens.de (curry.mchp.siemens.de [139.25.42.7]) by mail3.siemens.de (8.11.1/8.11.1) with ESMTP id f0O6flq20002044 for ; Wed, 24 Jan 2001 07:41:49 +0100 (MET) Received: (from localhost) by curry.mchp.siemens.de (8.11.1/8.11.1) id f0O6fl650149 for FreeBSD-gnats-submit@freebsd.org; Wed, 24 Jan 2001 07:41:47 +0100 (CET) Message-Id: <200101240641.f0O6flo96164@curry.mchp.siemens.de> Date: Wed, 24 Jan 2001 07:41:47 +0100 (CET) From: Andre Albsmeier To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: bin/24591: jobs command differs in interactive vs. non-interactive /bin/sh Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 24591 >Category: bin >Synopsis: jobs command differs in interactive vs. non-interactive /bin/sh >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Jan 23 22:50:00 PST 2001 >Closed-Date: >Last-Modified: >Originator: Andre Albsmeier >Release: FreeBSD 4.2-STABLE i386 >Organization: >Environment: FreeBSD 4.2-STABLE >Description: When the 'jobs' command is used in /bin/sh, its output differs depending if sh is an interactive vs. non-interactive shell. >How-To-Repeat: andre@bali:~>/bin/sh $ sleep 10 & $ jobs [1] 76401 sleep 10 $ vs. andre@bali:~>cat jobstest #!/bin/sh sleep 10 & jobs andre@bali:~>./jobstest [1] 76411 In an interactive shell, name and args of the backgrounded command are printed. These are missing in the case of the non-interactive shell. >Fix: Unknown. In /src/bin/sh/jobs.c,v 1.27.2.2 in line 337, the code out1str(ps->cmd); normally outputs the command which doesn't work in non-interactive shells. >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message