Re: Doubt of system(3)

2001-10-02 Thread Peter Pentchev
On Sat, Sep 29, 2001 at 11:28:39PM +0100, David Taylor wrote: [snip] IMO, the below patch is probably the best solution. Yep, it also fixes the fact that the return value from wait4() needs to be preserved, at least for the return statement of __system(). G'luck, Peter -- yields falsehood,

Re: Doubt of system(3)

2001-10-02 Thread David Taylor
On Tue, 02 Oct 2001, Alfred Perlstein wrote: * Peter Pentchev [EMAIL PROTECTED] [011002 05:21] wrote: On Sat, Sep 29, 2001 at 11:28:39PM +0100, David Taylor wrote: [snip] IMO, the below patch is probably the best solution. Yep, it also fixes the fact that the return value from

Re: Doubt of system(3)

2001-10-02 Thread Alfred Perlstein
* David Taylor [EMAIL PROTECTED] [011002 16:02] wrote: On Tue, 02 Oct 2001, Alfred Perlstein wrote: * Peter Pentchev [EMAIL PROTECTED] [011002 05:21] wrote: On Sat, Sep 29, 2001 at 11:28:39PM +0100, David Taylor wrote: [snip] IMO, the below patch is probably the best solution.

Doubt of system(3)

2001-09-29 Thread Toshihiko ARAI
I consider the following code of system(3). pid is changed by return value of _wait4(). I feel this need a correction. default:/* parent */ do { pid = _wait4(pid, pstat, 0, (struct rusage *)0); } while (pid

Re: Doubt of system(3)

2001-09-29 Thread Alfred Perlstein
* David Taylor [EMAIL PROTECTED] [010929 16:17] wrote: On Sat, 29 Sep 2001, David Taylor wrote: On Sat, 29 Sep 2001, Alfred Perlstein wrote: Why does it need to be corrected? What sort of bad behaviour are you seeing? You do 'a' and you see 'b' when you should see 'c'.

Re: Doubt of system(3)

2001-09-29 Thread David Taylor
On Sat, 29 Sep 2001, Alfred Perlstein wrote: * David Taylor [EMAIL PROTECTED] [010929 16:17] wrote: On Sat, 29 Sep 2001, David Taylor wrote: If you: 1. Fork, and create a child (say, pid 10) 2. Call system, which forks and creates a child (say, pid 11) 3. Make the child

Re: Doubt of system(3)

2001-09-29 Thread Alfred Perlstein
* Toshihiko ARAI [EMAIL PROTECTED] [010929 11:10] wrote: I consider the following code of system(3). pid is changed by return value of _wait4(). I feel this need a correction. default:/* parent */ do { pid =

Re: Doubt of system(3)

2001-09-29 Thread David Taylor
On Sat, 29 Sep 2001, Alfred Perlstein wrote: * Toshihiko ARAI [EMAIL PROTECTED] [010929 11:10] wrote: I consider the following code of system(3). pid is changed by return value of _wait4(). I feel this need a correction. default:/* parent */

Re: Doubt of system(3)

2001-09-29 Thread Alfred Perlstein
* David Taylor [EMAIL PROTECTED] [010929 15:44] wrote: On Sat, 29 Sep 2001, Alfred Perlstein wrote: * Toshihiko ARAI [EMAIL PROTECTED] [010929 11:10] wrote: I consider the following code of system(3). pid is changed by return value of _wait4(). I feel this need a correction.

Re: Doubt of system(3)

2001-09-29 Thread David Taylor
On Sat, 29 Sep 2001, David Taylor wrote: On Sat, 29 Sep 2001, Alfred Perlstein wrote: Why does it need to be corrected? What sort of bad behaviour are you seeing? You do 'a' and you see 'b' when you should see 'c'. What's a, b and c? Well, hypothetically (I have no time to