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

2011-02-08 Thread Chet Ramey
On 2/8/11 7:11 PM, Ingo Molnar wrote: > > * Chet Ramey wrote: > >> On 2/8/11 4:17 PM, Oleg Nesterov wrote: >> >>> Once again. If bash gets ^C and at the same time the current foreground >>> child exits normally (either because this jctl signal races with exit() >>> or because the child hooks SIG

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

2011-02-08 Thread Ingo Molnar
* Chet Ramey wrote: > On 2/8/11 4:17 PM, Oleg Nesterov wrote: > > > Once again. If bash gets ^C and at the same time the current foreground > > child exits normally (either because this jctl signal races with exit() > > or because the child hooks SIGINT and exits after that) SIGINT is lost. > >

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

2011-02-08 Thread Chet Ramey
On 2/8/11 4:17 PM, Oleg Nesterov wrote: > Once again. If bash gets ^C and at the same time the current foreground > child exits normally (either because this jctl signal races with exit() > or because the child hooks SIGINT and exits after that) SIGINT is lost. > > set_job_status_and_cleanup() in

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

2011-02-08 Thread Oleg Nesterov
On 02/08, Bob Proulx wrote: > > Oleg Nesterov wrote: > > $ sh -c 'while true; do /bin/true; done' > > Be careful that 'sh' is actually 'bash'. It isn't on a lot of > machines. To ensure that you are actually running bash you should > call bash explicitly. (At least we can't assume you are ru

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

2011-02-08 Thread Bob Proulx
Oleg Nesterov wrote: > $ sh -c 'while true; do /bin/true; done' Be careful that 'sh' is actually 'bash'. It isn't on a lot of machines. To ensure that you are actually running bash you should call bash explicitly. (At least we can't assume you are running bash otherwise.) Is the behavior

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

2011-02-08 Thread Oleg Nesterov
On 02/08, Chet Ramey wrote: > > On 2/8/11 1:21 PM, Oleg Nesterov wrote: > > Hello, > > > > We believe that the non-interactive bash doesn't handle CTRL-C > > correctly, please look into the attached thread from lkml for > > more details. > > Read http://www.cons.org/cracauer/sigint.html oooh... it

[BUG] Bash not reacting to Ctrl-C

2011-02-08 Thread Oleg Nesterov
Hello, We believe that the non-interactive bash doesn't handle CTRL-C correctly, please look into the attached thread from lkml for more details. In short: bash incorrectly assumes that if it is interrupted by ^C then the current foreground job should be killed by this signal too. This doesn't wo

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

2011-02-08 Thread Chet Ramey
On 2/8/11 1:21 PM, Oleg Nesterov wrote: > Hello, > > We believe that the non-interactive bash doesn't handle CTRL-C > correctly, please look into the attached thread from lkml for > more details. Read http://www.cons.org/cracauer/sigint.html and see if you still feel the same way. Chet -- ``The

Re: How to get control from bash script of a batch job

2011-02-08 Thread Pierre Gaston
On Tue, Feb 8, 2011 at 7:38 AM, mauede wrote: > > If I type "qstat" on a terminal line I get the batch running process ID > which is not the same as $!. You are confusing bash's jobs with the jobs of the batch utilities, they are 2 unrelated things

Re: How to get control from bash script of a batch job

2011-02-08 Thread Greg Wooledge
On Mon, Feb 07, 2011 at 09:38:42PM -0800, mauede wrote: > I launch a Monte Carlo simulation as a batch job from a bash script: > > exb BEAM_$acc_name $beamin 521icru2 long batch=PBS p=1& You're launching it in the background. > I can still get the process id (I think) through the command: > >

How to get control from bash script of a batch job

2011-02-08 Thread mauede
I launch a Monte Carlo simulation as a batch job from a bash script: exb BEAM_$acc_name $beamin 521icru2 long batch=PBS p=1& I can still get the process id (I think) through the command: exb1_pid=$! I have to launch another simulation which will be given in input a file created by the prev