Re: Memory leak in wait

2015-03-06 Thread Jean Delvare
Hi Chet, Le Thursday 05 March 2015 à 11:11 -0500, Chet Ramey a écrit : > 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 > >>>

Re: Memory leak in wait

2015-03-05 Thread Chet Ramey
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,

Re: Memory leak in wait

2015-03-02 Thread Jean Delvare
Hi Dave, On Mon, 2 Mar 2015 04:38:43 -0500, Dave Rutherford wrote: > On Mon, Mar 2, 2015 at 2:33 AM, Jean Delvare wrote: > > Which brings another question: is there any plan to implement sleep as > > a bash builtin? > > It's already available as a loadable builtin (examples/loadables/sleep.c).

Re: Memory leak in wait

2015-03-02 Thread Dave Rutherford
On Mon, Mar 2, 2015 at 2:33 AM, Jean Delvare wrote: > Which brings another question: is there any plan to implement sleep as > a bash builtin? It's already available as a loadable builtin (examples/loadables/sleep.c).

Re: Memory leak in wait

2015-03-01 Thread Jean Delvare
On Sat, 28 Feb 2015 11:29:14 +0100, Jean Delvare wrote: > I think we will stay away from background sleep and wait for now, and > instead use: > > read -t 1 -N 0 > > This was suggested by an lm-sensors user and as far as I can tell it > fits the bill with no downside. For the record: it do

Re: Memory leak in wait

2015-02-28 Thread Jean Delvare
Hi Chet, Sorry for reviving an old discussion, I lost track back then. 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 th

Re: Memory leak in wait

2014-11-07 Thread Chet Ramey
On 11/7/14, 3:49 AM, Jean Delvare wrote: > Hi Chet, > > Thanks for the fast reply and the explanations, very appreciated. > > On Thu, 06 Nov 2014 20:57:11 -0500, Chet Ramey wrote: >> On 11/6/14 8:09 AM, Jean Delvare wrote: >>> A memory leak has been reported in a bash script I maintain [1]. After

Re: Memory leak in wait

2014-11-07 Thread Jean Delvare
Hi Chet, Thanks for the fast reply and the explanations, very appreciated. On Thu, 06 Nov 2014 20:57:11 -0500, Chet Ramey wrote: > On 11/6/14 8:09 AM, Jean Delvare wrote: > > A memory leak has been reported in a bash script I maintain [1]. After > > investigation, I was able to shrink the test ca

Re: Memory leak in wait

2014-11-06 Thread Chet Ramey
On 11/6/14 8:09 AM, Jean Delvare wrote: > Hi all, > > A memory leak has been reported in a bash script I maintain [1]. After > investigation, I was able to shrink the test case down to: > > while true > do > sleep 1 & > wait $! > done This isn't a memory leak, and the memory use is b

Memory leak in wait

2014-11-06 Thread Jean Delvare
Hi all, A memory leak has been reported in a bash script I maintain [1]. After investigation, I was able to shrink the test case down to: while true do sleep 1 & wait $! done The above loop has an always-rising memory consumption (RSS value as reported by ps -o rss.) This one OTO