[ucc] process trees/groups issue
Harry McNally
harrymc at decisions-and-designs.com.au
Sun Nov 6 12:47:52 WST 2005
Bernard Blackham wrote:
> I have a process that is run from the shell. It spawns off another
> process as its child. The process tree at this point looks like
> sh
> \_ task1
> \_ task2
>
> I'd like to kill off task1 and get the process tree to look like
> sh
> \_ task2
>
> Well, specifically what I'd practically like to do is to have task1
> die, and still have the shell wait for task2 to terminate before
> regaining control of the terminal. How the process tree looks really
> is irrelevant.
> Any ideas?
Hi Bernard
If having task1 hanging around doesn't matter, could you have some magic
catch all signal handler in task1 that prevents it from exiting under
any circumstances until task2 exits ? When task2 exits it all unravels
and returns control to an oblivious sh. What things can't you catch and
are they likely to happen in your (bug free) task1 ?
If task1 _has_ to exit then split it into:
sh
|_ tiny_task1_parent
|_ task1_bloat_that_must_exit
|_ task2
cu
Harry
More information about the ucc
mailing list