Re: bash kill(1) doesn't report errors when $(ulimit -i) is exceeded

2013-07-16 Thread Linus Torvalds
On Tue, Jul 16, 2013 at 1:31 PM, Lionel Cons wrote: > > Either your ulimit -i is greater than 63000 or we have a Linux bug. If > ulimit -i is reached then kill(1) should fail. Traditionally kill() has never returned errors for things like this. In fact, quite arguably POSIX actively disallows kil

Re: [BUG] Bash not reacting to Ctrl-C

2011-03-07 Thread Linus Torvalds
On Mon, Mar 7, 2011 at 8:45 AM, Chet Ramey wrote: > > The one thing that jumps out at me here is the number of signal-handling > system calls.  wait_sigint_handler gets installed and removed as the > SIGINT handler a lot.  I wonder if we would see an improvement if I > used a global SIGINT handler

Re: [BUG] Bash not reacting to Ctrl-C

2011-03-07 Thread Linus Torvalds
On Mon, Mar 7, 2011 at 8:24 AM, Linus Torvalds wrote: > > and I think one reason why the race is hard to get rid of is simply > that system call return is _the_ common point of signal handling in > UNIX (technically, obviously any return to user space, but there are > no appreci

Re: [BUG] Bash not reacting to Ctrl-C

2011-03-07 Thread Linus Torvalds
On Mon, Mar 7, 2011 at 7:52 AM, Chet Ramey wrote: > > Let's take a step back and approach this a different way.  Instead of > trying to intuit whether or not the child did anything with the SIGINT, > let's try to make the race condition smaller. I can still easily see the porblem. I think your pa

Re: [BUG] Bash not reacting to Ctrl-C

2011-02-28 Thread Linus Torvalds
On Mon, Feb 28, 2011 at 6:20 PM, Chet Ramey wrote: > > The patch looks good.  I'll take a closer look and probably produce a > patch for bash-4.2 based on it.  Thanks for taking a look. So I think that Oleg Nesterov is correct in that the -1 return with errno==EINTR will never actually trigger, b

Re: [BUG] Bash not reacting to Ctrl-C

2011-02-11 Thread Linus Torvalds
On Fri, Feb 11, 2011 at 1:30 PM, Linus Torvalds wrote: > > The other case is that the child process was quick and already exited. > You get ^C, but the child never did. When you do the waitpid(), you'll > never get the EINTR, because there was no actual wait. Ok, so here's

Re: [BUG] Bash not reacting to Ctrl-C

2011-02-11 Thread Linus Torvalds
On Fri, Feb 11, 2011 at 1:16 PM, Chet Ramey wrote: > > In the meantime, read Martin Cracauer's description of the issue. > http://www.cons.org/cracauer/sigint.html. This is now the second time in the thread that this has been quoted, but bash doesn't even FOLLOW the recommendations in that web-pa

Re: [BUG] Bash not reacting to Ctrl-C

2011-02-11 Thread Linus Torvalds
On Fri, Feb 11, 2011 at 12:21 PM, Chet Ramey wrote: > > You do realize that this case is indistinguishable from the original > scenario in question: the child gets the SIGINT, handles it, and exits > successfully (or not).  Have you actually not followed the discussion? Umm. I'm the one who broug

Re: [BUG] Bash not reacting to Ctrl-C

2011-02-11 Thread Linus Torvalds
On Fri, Feb 11, 2011 at 8:57 AM, Illia Bobyr wrote: > On 2/9/2011 3:57 PM, Linus Torvalds wrote: >> >> Here's the scenario: I'll quote the scenario again, because you clearly didn't bother to read it. Please _READ_ it this time before you answer, ok? >>   -

Re: [BUG] Bash not reacting to Ctrl-C

2011-02-10 Thread Linus Torvalds
On Wed, Feb 9, 2011 at 1:18 PM, Bob Proulx wrote: > > Since the exit status of /bin/true is ignored then I think that test > case is flawed.  I think at the least needs to check the exit status > of the /bin/true process. > >  bash -c 'while true; do /bin/true || exit 1; done' The "|| exit 1" doe