Stephane CHAZELAS wrote:
> 2017-10-31 11:38:37 +0100, Joerg Schilling:
> [...]
> > OK, the Bourne Shell can IO redirection only with a fork.
> [...]
>
> Except for builtins and functions (at least with some versions
> like Solaris 10's /bin/sh).
>
> That seems to
2017-10-31 11:38:37 +0100, Joerg Schilling:
[...]
> OK, the Bourne Shell can IO redirection only with a fork.
[...]
Except for builtins and functions (at least with some versions
like Solaris 10's /bin/sh).
That seems to also work for "eval", so one could also do:
eval 'cmd <&3 3<&- &' 3<&0;
Stephane CHAZELAS wrote:
> There's no pipe in:
>
> { cmd <&3 3<&- & } 3<&0
> pid=$!
>
> and POSIX does require $! to contain the pid of the process that
> executed cmd there.
>
> As already discussed, the fact that redirected compound commands
> were run in a
Stephane Chazelas wrote:
> So an application has to do:
>
> cmd < /dev/null &
>
> if it wants to make sure cmd is redirected from /dev/null.
>
> and:
>
> { cmd <&3 3<&- & } 3<&0
>
> if it wants to work around that (inconsistent) (mis-)feature of
> some shells.
>
>
Stephane Chazelas wrote:
> 2017-10-30 09:24:21 -0400, Chet Ramey:
> [...]
> > As it reads right now, a reasonable person could infer that `this activity'
> > means the behavior described by the rest of the paragraph (`shall be
> > considered...'), and that the
Robert Elz wrote:
> Date:Mon, 30 Oct 2017 11:10:59 +0100
> From:Joerg Schilling
> Message-ID:
> <59f6fab3.e5lk2pfuroy2omt4%joerg.schill...@fokus.fraunhofer.de>
>
> | Just as a hint: the implicit redirection
2017-10-30 09:24:21 -0400, Chet Ramey:
[...]
> As it reads right now, a reasonable person could infer that `this activity'
> means the behavior described by the rest of the paragraph (`shall be
> considered...'), and that the /dev/null redirection doesn't happen if
> stdin is explicitly redirected
On 10/29/17 7:56 PM, Robert Elz wrote:
> | | In all cases, explicit redirection of standard input shall
> | | override this activity.
>
> That last sentence just shouldn't be there - it already says that
> the implicit redirect to /dev/null happens before explicit redirects,
> which is all
Date:Mon, 30 Oct 2017 11:10:59 +0100
From:Joerg Schilling
Message-ID: <59f6fab3.e5lk2pfuroy2omt4%joerg.schill...@fokus.fraunhofer.de>
| Just as a hint: the implicit redirection to /dev/null happens at the moment
| when a
Robert Elz wrote:
> Date:Sun, 29 Oct 2017 21:47:43 +
> From:Martijn Dekker
> Message-ID: <6432d459-75de-0afe-6716-7960e7a0a...@inlv.org>
>
> | | In all cases, explicit redirection of standard input shall
> | | override
Martijn Dekker wrote:
> Question: should the last sentence quoted above also apply if standard
> input is explicitly redirected to itself? E.g., when running the
> following with job control disabled (e.g. as a script) and standard
> input on a terminal:
>
> if [ -t 0 ];
Date:Sun, 29 Oct 2017 21:47:43 +
From:Martijn Dekker
Message-ID: <6432d459-75de-0afe-6716-7960e7a0a...@inlv.org>
| | In all cases, explicit redirection of standard input shall
| | override this activity.
That last sentence just shouldn't be
12 matches
Mail list logo