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: Wed, 04 Jan 2012 16:20:18 +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:
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 SIGSTOP to the job, and make
the trap handler to do both things at once? Not that it is strictly
required since you already described a few other ways, but I wonder. :)
Well, this is getting pretty esoteric.  On one hand, you can avoid the
entire SIGSTOP/SIGCONT issue by initially starting the job in the
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.
Hello Chet, I double-checked that, and with the attached
quick hack I was able to do:
trap bg USR1
and move the job to the background with just that SIGUSR1.
Do you think such a feature is worth being implemented?
If yes, feel free to give me the suggestions and I'll try to
implement it properly. The attached patch is just a POC of
course, it is entirely incorrect.

Attachment: jobs.c.diff
Description: Text document


reply via email to

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