Re: bug in force_interactive handling

2012-01-02 Thread Stas Sergeev
03.01.2012 00:07, Chet Ramey wrote: background with `&'. On the other, if you want to move a foreground job to the background, you have to get it to give up control somehow, and sending it a signal is the way to do that. Unless I am mistaken, nothing special is required for that, and SIGSTOP on

Re: bug in force_interactive handling

2012-01-02 Thread Chet Ramey
On 1/2/12 2:10 PM, Stas Sergeev wrote: >>> Will your suggestion about the trap handler work >>> also for ^Z+bg rather than just fg? >> It should. > I tried: > --- > trap bg USR1 > --- > Now if I first send SIGSTOP to the job and then SIGUSR1 to > bash, that works. > Is it possible to avoid sending

Re: bug in force_interactive handling

2012-01-02 Thread Stas Sergeev
02.01.2012 22:53, Chet Ramey wrote: the script, leaving the process alive. The SIGSTOP/SIGCONT works to put the process into the background: the jobs pgrp is not the same as the terminal's pgrp. If you don't want the shell to terminate the job at exit because it's stopped, use `disown' after th

Re: bug in force_interactive handling

2012-01-02 Thread Chet Ramey
On 1/2/12 1:38 PM, Stas Sergeev wrote: > 02.01.2012 22:27, Chet Ramey wrote: >>> In this case it would be nice for bash to have >>> a signal that will move the background process >>> to the foreground. >> But there is already a command to do that: fg. > Sorry, mistyped, I meant the other way around

Re: bug in force_interactive handling

2012-01-02 Thread Stas Sergeev
02.01.2012 22:27, Chet Ramey wrote: In this case it would be nice for bash to have a signal that will move the background process to the foreground. But there is already a command to do that: fg. Sorry, mistyped, I meant the other way around: move the foreground process to the background, then

Re: bug in force_interactive handling

2012-01-02 Thread Chet Ramey
On 1/2/12 4:27 AM, Stas Sergeev wrote: > 02.01.2012 07:15, Chet Ramey wrote: >> Thanks, I inadvertently left that part of the patch out of what I sent. > Will you apply this patch for the next bash release? Yes, it's already applied. > In this case it would be nice for bash to have > a signal th

Re: bug in force_interactive handling

2012-01-02 Thread Stas Sergeev
02.01.2012 07:15, Chet Ramey wrote: On 12/30/11 5:36 AM, Stas Sergeev wrote: Hello Chet, thanks for your patch file. It is slightly broken, attached is the fixed version of your patch. BUT: it solves only half of the bug. Thanks, I inadvertently left that part of the patch out of what I sent.