From owner-freebsd-bugs Thu Feb 14 4:30: 6 2002 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 87D6D37B405 for ; Thu, 14 Feb 2002 04:30:03 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g1ECU3m76440; Thu, 14 Feb 2002 04:30:03 -0800 (PST) (envelope-from gnats) Date: Thu, 14 Feb 2002 04:30:03 -0800 (PST) Message-Id: <200202141230.g1ECU3m76440@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Martin.Kaeske@stud.tu-ilmenau.de Subject: Re: bin/34811: sh: "jobs" is not pipeable Reply-To: Martin.Kaeske@stud.tu-ilmenau.de 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 The following reply was made to PR bin/34811; it has been noted by GNATS. From: Martin.Kaeske@stud.tu-ilmenau.de To: freebsd-gnats-submit@FreeBSD.org, slaven.rezic@berlin.de Cc: Subject: Re: bin/34811: sh: "jobs" is not pipeable Date: 14 Feb 2002 12:18:18 -0000 I can't say I understood /usr/src/bin/sh completely, but it seems that sh forks a new shell if it detects a pipe "|". This new shell is responsible for evaluating the pipe, that means "jobs|grep" creates a new shell and jobs is executed within the new shell and not in root-shell. I don't know wether such behaviour is intended or not. What disturbs me is the following (from sh(1)): Shell builtin commands are the exception to this rule. They are executed in the current shell,... Does "current shell" mean the root-shell? If that's correct I think sh doesn't behave as documented in sh(1). If its really a bug can someone tell me what the expected behaviour is? Maybe I can fix it. Or is such treatment of pipes required by any standard (maybe posix-1003.2)?. Martin To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message