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 also work for "eval", so one cou
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; ec
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 subshell is a very well known non-POS
2017-10-30 16:32:30 +0100, Joerg Schilling:
> 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
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.
>
> which btw didn't work in the Bou
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 /dev/null redirection doesn't happen
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 to /dev/null happens at the
> moment
> | when a proce
2017-10-30 13:43:18 +, Stephane Chazelas:
[...]
> In any case, that "feature" is not useful. In my experience, I
> more often have to work around it than it comes handy.
>
> I suppose the rationale was that it helped in case stdin was a
> terminal to make sure the asynchronous command did not
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 th
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 process is added to the job list which hap
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 this activity.
>
> That last sentence ju
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 ]; then echo yes; else e
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 there - it already
2.9.3 List states under "Asynchronous Lists":
http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_09_03_02
| If job control is disabled (see set, -m), the standard input for an
| asynchronous list, before any explicit redirections are performed,
| shall be considered to
15 matches
Mail list logo