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 that will move the background process > to the foreground. But there is already a command to do that: fg. You can hook SIGCHLD with a trap handler, process the `jobs' output, and fg the appropriate process. I still think that's way more work than you need to do. > 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. Since you're not really using job control at all, but controlling the process's status by sending it signals from another process, you could add a process in between, making the job you're interested in a grandchild of the shell. That way it doesn't matter what the shell does when it exits. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, ITS, CWRU c...@case.edu http://cnswww.cns.cwru.edu/~chet/