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

2011-02-11 Thread Chet Ramey
On 2/11/11 4:00 PM, Oleg Nesterov wrote: On 02/11, 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). I already tried to discuss this, but you didn't reply ;)

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 chet.ra...@case.edu 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

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 chet.ra...@case.edu 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

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 torva...@linux-foundation.org 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

Re: help's blank lines have four spaces appended

2011-02-11 Thread Clark J. Wang
On Fri, Feb 11, 2011 at 11:16 PM, Chet Ramey chet.ra...@case.edu wrote: On 2/11/11 4:02 AM, Clark J. Wang wrote: On Mon, Feb 7, 2011 at 12:01 AM, Chet Ramey chet.ra...@case.edu mailto:chet.ra...@case.edu wrote: On 2/6/11 2:01 AM, jida...@jidanni.org mailto:jida...@jidanni.org wrote:

Re: Don't show help of `readonly' and `readarray' when I run `help read'

2011-02-11 Thread Clark J. Wang
I forgot to reply to all On Fri, Feb 11, 2011 at 11:15 PM, Chet Ramey chet.ra...@case.edu wrote: On 2/11/11 3:53 AM, Clark J. Wang wrote: On Thu, Feb 10, 2011 at 10:21 PM, Chet Ramey chet.ra...@case.edu mailto:chet.ra...@case.edu wrote: On 2/10/11 4:03 AM, Clark J. Wang wrote:

Can someone explain this?

2011-02-11 Thread Jon Seymour
Can someone explain why this is happening? #expected $ bash -c 'cd /tmp; pwd' /tmp #expected $ bash -c 'pwd; cd /tmp; pwd' /home/jseymour /tmp #expected $ ssh localhost bash -c 'pwd; cd /tmp; pwd' /home/jseymour /tmp #unexpected $ ssh localhost bash -c 'cd /tmp; pwd' /home/jseymour My

Re: Can someone explain this?

2011-02-11 Thread Jon Seymour
Correction - a _leading_ cd command and only a leading cd command, seems to be completely ignored in the case I described. Why is this? jon. -- Forwarded message -- From: Jon Seymour jon.seym...@gmail.com Date: Sat, Feb 12, 2011 at 2:18 PM Subject: Can someone explain this? To:

Re: Can someone explain this?

2011-02-11 Thread Dennis Williamson
On Fri, Feb 11, 2011 at 9:21 PM, Jon Seymour jon.seym...@gmail.com wrote: Correction - a _leading_ cd command and only a leading cd command, seems to be completely ignored in the case I described. Why is this? jon. -- Forwarded message -- From: Jon Seymour

Re: Can someone explain this?

2011-02-11 Thread Jon Seymour
Ok, so it relates to how ssh interprets its command argument: So: bash -c 'cd /tmp ; pwd' My expectation was that it would invoke bash with the arguments: '-c' 'cd /tmp; pwd' But bash is actually invoked with: '-c' 'cd' '/tmp' and then pwd is invoked, presumably in same shell that

Re: Can someone explain this?

2011-02-11 Thread Dennis Williamson
On Fri, Feb 11, 2011 at 10:28 PM, Jon Seymour jon.seym...@gmail.com wrote: Ok, so it relates to how ssh interprets its command argument: So:    bash -c 'cd /tmp ; pwd' My expectation was that it would invoke bash with the arguments: '-c' 'cd /tmp; pwd' But bash is actually invoked

Re: Can someone explain this?

2011-02-11 Thread Bob Proulx
Dennis Williamson wrote: Yes, do your quoting like this: ssh localhost 'bash -c cd /tmp; pwd' I am a big fan of piping the script to the remote shell. $ echo cd /tmp pwd | ssh example.com bash /tmp This has two advantages. One is that you can pick your shell on the remote host.

Re: Can someone explain this?

2011-02-11 Thread Jon Seymour
On Sat, Feb 12, 2011 at 4:54 PM, Bob Proulx b...@proulx.com wrote: I am a big fan of piping the script to the remote shell.  $ echo cd /tmp pwd | ssh example.com bash  /tmp This has two advantages.  One is that you can pick your shell on the remote host.  Otherwise it runs as whatever is