bug-bash
[Top][All Lists]
Advanced

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

Re: bash enters endless loop when under unreasonably low RLIMIT_NPROC


From: Chet Ramey
Subject: Re: bash enters endless loop when under unreasonably low RLIMIT_NPROC
Date: Sat, 06 Dec 2014 22:46:54 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.2.0

On 12/6/14 7:06 AM, Robert Clausecker wrote:

>       Fix the way bash blocks the delivery of signals when it can't
>       fork so keyboard interrupts or signals received otherwise still
>       have a way to get through. Stop trying to fork after some
>       attempts and provide a reasonable emergency code-path for the
>       case that bash cannot fork.

Bash already does this.  The code in make_child attempts to reap dead
child processes with waitpid() then sleeps for `forksleep' seconds.
forksleep increases from 1 to 16, then bash gives up and the attempt
fails.  When I test, it returns to the prompt.

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



reply via email to

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