The trap will exit if *any* child process exits for any reason, but the command needs to be backgrounded for a signal to bubble up.
Now, if the primary svscan process dies, svscanboot will exit and be restarted. This is also the case if the readproctitle process dies, but that's desirable, too.
Can someone with more shell clues check this over?
This seems to do the job:
trap exit CHLD ....... ....... ....... ....... ....... ....... \ ....... ....... ....... ....... ....... ....... ....... ....... ....... ....... ..\ ....... ....... ....... ....... ....... ....... ....... ....... ....... ....... ..\ ....... ....... ....... ....... ....... ....... ....... ....... ....... ....... ..\ ....... ....... ....... ....... ....... ....... ....... ....... ....... ....... ..\ ....... ....... ....... ....... &
env - PATH=$PATH svscan /etc/service 2>&1 | \
readproctitle service errors: .......
.......
.......
.......
.......
.......
wait
The trap will exit if *any* child process exits for any reason, but the command needs to be backgrounded for a signal to bubble up.
Now, if the primary svscan process dies, svscanboot will exit and be restarted. This is also the case if the readproctitle process dies, but that's desirable, too.
Can someone with more shell clues check this over?