Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Feb 2002 04:30:03 -0800 (PST)
From:      Martin.Kaeske@stud.tu-ilmenau.de
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: bin/34811: sh: "jobs" is not pipeable
Message-ID:  <200202141230.g1ECU3m76440@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200202141230.g1ECU3m76440>