bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Memory leak in wait


From: Chet Ramey
Subject: Re: Memory leak in wait
Date: Thu, 05 Mar 2015 11:11:13 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.5.0

On 2/28/15 5:29 AM, Jean Delvare wrote:

> On Fri, 07 Nov 2014 08:24:07 -0500, Chet Ramey wrote:
>> On 11/7/14, 3:49 AM, Jean Delvare wrote:
>>> 2* If bash remembers the process statuses, how does one access the
>>>    information? I couldn't find anything related to that in the manual
>>>    page, but it's huge so maybe I missed it.
>>
>> You can use wait with a pid argument, maybe one that you saved earlier
>> in a script or obtained from `ps'.
> 
> My question is, what is the point of keeping the information after wait
> has been called for that PID? If this is the only possible use of the
> information, I do not understand why the record is not discarded after
> calling "wait $pid".

Because the shell has always allowed a script to wait for a process
multiple times.

The shell discards all saved statuses when `wait' is called without
arguments.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    chet@case.edu    http://cnswww.cns.cwru.edu/~chet/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]