Am 17.05.2005 um 11:50 schrieb [EMAIL PROTECTED]: > I have a problem with a bash script. The script (example) is very simple: > > #!/bin/bash > > echo hello > ssh PT-AGCMLX1 "while true; do date; sleep 10s; done" [..] > How can I change my script so that it kills all its child processes, if it > is killed itself ? I tried to use the "trap" function of bash, but it > never used the correct pid...
Have you tried to use "exec ssh PT-..." instead? "exec ssh" will replace the shell process with ssh, so there will be no shell process left after you've killed the ssh process. Regards, Dennis -- Send personal mail to [EMAIL PROTECTED] only. Off-list mails to [EMAIL PROTECTED] will not reach me. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]