[Fwd: Re: bash sometimes don't wait for children process]

2008-10-20 Thread Roman Rakus
--- Begin Message --- Chet Ramey wrote: Roman Rakus wrote: To see if we created a process in execute_simple_command that we need to wait for. The presence of non-Unix systems that tend to recycle pids quickly (or allocate at random from a small pool) makes the check unreliable, so we call

Re: bash sometimes don't wait for children process

2008-10-17 Thread Chet Ramey
Roman Rakus wrote: >> To see if we created a process in execute_simple_command that we need >> to wait for. The presence of non-Unix systems that tend to recycle >> pids quickly (or allocate at random from a small pool) makes the check >> unreliable, so we call wait_for every time. >> > Yes, b

Re: bash sometimes don't wait for children process

2008-10-16 Thread Roman Rakus
Chet Ramey wrote: last_made_pid != last_pid) { ... exec_result = wait_for (last_made_pid); } I'm wondering why we are doing assignment (last_pid = last_made_pid;) and then test it (&& last_made_pid != last_pid)? To see if we created a process

Re: bash sometimes don't wait for children process

2008-10-15 Thread Chet Ramey
> last_made_pid != last_pid) > { > ... > exec_result = wait_for (last_made_pid); > } > > I'm wondering why we are doing assignment (last_pid = last_made_pid;) > and then test it (&& last_made_pid != last_pid)? To see if we created a process in execu

bash sometimes don't wait for children process

2008-10-15 Thread Roman Rakus
There is code in "execute_cmd.c" function "execute_command_internal": ... #if defined (RECYCLES_PIDS) last_made_pid = NO_PID; #endif last_pid = last_made_pid; ... if (already_making_children && pipe_out == NO_PIPE && last_made_pid != last_pid) { ...