Juli Mallett wrote this message on Wed, Jun 25, 2003 at 00:15 -0500:
* Juli Mallett [EMAIL PROTECTED] [ Date: 2003-06-24 ]
[ w.r.t. Re: tcsh being dodgy, or pipe code ishoos? ]
* Tim Kientzle [EMAIL PROTECTED] [ Date: 2003-06-24 ]
Hmmm... This looks like xargs isn't waiting
John-Mark Gurney wrote this message on Tue, Jun 24, 2003 at 23:04 -0700:
Ok, I seem to have found out that we are reaping a child that we don't
know about. slightly modified xargs produces this:
ok, with some magic ktrace work, I have come up with an more complete
answer to the riddle. It's
On Wed, Jun 25, 2003 at 12:41:51AM -0700, John-Mark Gurney wrote:
[...]
So, now the question is, do we fix xargs to deal with unexpected
children? Or fix the shells in question? (tcsh and zsh seem to suffer
this problem)
To me, fixing xargs is correct since it prevents another possible
John-Mark Gurney wrote:
So, now the question is, do we fix xargs to deal with unexpected
children? Or fix the shells in question? (tcsh and zsh seem to suffer
this problem)
To me, fixing xargs is correct since it prevents another possible
future abusers of this feature.
Fixing the shells
John-Mark Gurney wrote:
ok, with some magic ktrace work, I have come up with an more complete
answer to the riddle. It's how the shell exec's the processes. The
bare cause can be demo'd by:
( ( echo 2 ; echo 3 ) | ./xargs -I% echo + % )
Say the shell you run the above command is 10. It will
Tim J. Robbins wrote this message on Wed, Jun 25, 2003 at 19:20 +1000:
On Wed, Jun 25, 2003 at 12:41:51AM -0700, John-Mark Gurney wrote:
[...]
So, now the question is, do we fix xargs to deal with unexpected
children? Or fix the shells in question? (tcsh and zsh seem to suffer
this
Tim Kientzle wrote this message on Wed, Jun 25, 2003 at 09:51 -0700:
[...]
Say the shell you run the above command is 10. It will fork to create
a shell to run the commands in the outter parens. Call this 11. 11's
job is to run: (echo 2; echo 3) | ./xargs -I% echo +%
11 will fork/exec and
John-Mark Gurney wrote:
Tim Kientzle wrote this message on Wed, Jun 25, 2003 at 09:51 -0700:
Why do exec-ed processes inherit the children of the former
process, anyway? That doesn't entirely sound right to me.
Is that behavior mandated by some standard? If not, this
could arguably be
Anyone with insight into this?
([EMAIL PROTECTED]:~)39% ( echo 1 ; ( ( echo 2 ; echo 3 ) | xargs -I% echo + % ) )
1
+ 2
+ 3
([EMAIL PROTECTED]:~)40% ( echo 1 ; ( ( echo 2 ; echo 3 ) | xargs -I% echo + % ) ) |
cat
1
+ +2
3
([EMAIL PROTECTED]:~)41% ( echo 1 ; ( ( echo 2 ; echo 3 ) | xargs -I% echo
On Tue, Jun 24, 2003 at 18:35:15 -0500, Juli Mallett wrote:
Anyone with insight into this?
([EMAIL PROTECTED]:~)39% ( echo 1 ; ( ( echo 2 ; echo 3 ) | xargs -I% echo + % ) )
1
+ 2
+ 3
Loks like stdout/stderr mix, but I not check the code, so just raw guess.
* Andrey Chernov [EMAIL PROTECTED] [ Date: 2003-06-24 ]
[ w.r.t. Re: tcsh being dodgy, or pipe code ishoos? ]
On Tue, Jun 24, 2003 at 18:35:15 -0500, Juli Mallett wrote:
Anyone with insight into this?
([EMAIL PROTECTED]:~)39% ( echo 1 ; ( ( echo 2 ; echo 3 ) | xargs -I% echo
Juli Mallett wrote:
Anyone with insight into this?
([EMAIL PROTECTED]:~)39% ( echo 1 ; ( ( echo 2 ; echo 3 ) | xargs -I% echo + % ) )
1
+ 2
+ 3
([EMAIL PROTECTED]:~)40% ( echo 1 ; ( ( echo 2 ; echo 3 ) | xargs -I% echo + % ) ) |
cat
1
+ +2
3
last cat is not necessary...
And it's more
On Tue, Jun 24, 2003 at 18:54:11 -0500, Juli Mallett wrote:
stdout. Where does stderr come into it? Yes I know about TTY races
Forget about stderr, it looks like fork race somewhere. Minimal example
will be
( ( echo 2 ; echo 3 ) | xargs -I% echo + % )
which outputs
+ + 3
2
in rare cases.
jmallett Anyone with insight into this?
Me Too with zsh 4.0.6 on 5-current as of early June/2003.
-- -
Makoto `MAR' Matsushita
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail
Artem 'Zazoobr' Ignatjev wrote:
Juli Mallett wrote:
Anyone with insight into this?
([EMAIL PROTECTED]:~)39% ( echo 1 ; ( ( echo 2 ; echo 3 ) | xargs -I% echo + % ) )
1
+ 2
+ 3
([EMAIL PROTECTED]:~)40% ( echo 1 ; ( ( echo 2 ; echo 3 ) | xargs -I% echo + % ) ) |
cat
1
+ +2
3
last cat is not
Tim Kientzle wrote this message on Tue, Jun 24, 2003 at 21:19 -0700:
Artem 'Zazoobr' Ignatjev wrote:
Juli Mallett wrote:
Anyone with insight into this?
([EMAIL PROTECTED]:~)39% ( echo 1 ; ( ( echo 2 ; echo 3 ) | xargs -I%
echo + % ) )
1
+ 2
+ 3
([EMAIL PROTECTED]:~)40% ( echo 1 ; ( (
* Tim Kientzle [EMAIL PROTECTED] [ Date: 2003-06-24 ]
[ w.r.t. Re: tcsh being dodgy, or pipe code ishoos? ]
Artem 'Zazoobr' Ignatjev wrote:
Juli Mallett wrote:
Anyone with insight into this?
([EMAIL PROTECTED]:~)39% ( echo 1 ; ( ( echo 2 ; echo 3 ) | xargs -I% echo + % ) )
1
* Juli Mallett [EMAIL PROTECTED] [ Date: 2003-06-24 ]
[ w.r.t. Re: tcsh being dodgy, or pipe code ishoos? ]
* Tim Kientzle [EMAIL PROTECTED] [ Date: 2003-06-24 ]
Hmmm... This looks like xargs isn't waiting for the subcommand
to exit. This looks like 'echo -- + 2' and 'echo -- + 3
18 matches
Mail list logo