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: Tue, 03 Jan 2012 01:55:32 +0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20111115 Thunderbird/8.0

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 only makes waitpid() to return,
but any other signal can be used to interrupt waitpid()
with EINTR. But, in case of EINTR, bash simply restarts
waitpid() it seems.
So my wild guess is that the functionality of moving
the process to the background can be implemented
with some special type of trap that will not restart
waitpid() after that signal is received.
But anyway, I already have the workable solutions to
this. :)



reply via email to

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