bug-bash
[Top][All Lists]
Advanced

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

Re: bug in force_interactive handling


From: Stas Sergeev
Subject: Re: bug in force_interactive handling
Date: Mon, 02 Jan 2012 13:27:01 +0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20111115 Thunderbird/8.0

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.
Will you apply this patch for the next bash release?

Do you know how to fix also this?
If you send the `cat' a SIGCONT it will end up running in the background:
its process group id will never be the same as the terminal's.  Sending
SIGCONT from another process will not set the terminal's process group to
cat's pgid.  That's why things like `fg' and `bg' are shell builtins --
so the shell can multiplex the terminal's process group among its children.
Thanks for the explanation.
In this case it would be nice for bash to have
a signal that will move the background process
to the foreground. Without this I still can't do
what I intended: I wanted the script to finish,
leaving the background process running. This
works only if my script sleeps till I send SIGCONT
to the process.
If it doesn't sleep, the SIGCONT may arrive later
than the script finishes, and the job gets killed.
I wonder if its possible in bash to implement the
signal handler to move the process to the background,
but that's probably about asking too much. :)
Thanks for your help!



reply via email to

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