![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Can a child process return a specific value to a parent process ? | Ametis1970 | High Level Programming | 8 | 04-10-2008 12:22 AM |
| Killing of a process and send a mail if the process doesnot come up within 2 minutes | Prince89 | Shell Programming and Scripting | 1 | 02-15-2008 07:10 PM |
| killing a process | bbhayana | UNIX for Dummies Questions & Answers | 6 | 06-02-2007 08:58 AM |
| killing a child process | mervin2006 | Shell Programming and Scripting | 4 | 05-02-2007 07:16 AM |
| killing a child process within a shell | yerics | Shell Programming and Scripting | 2 | 06-27-2003 06:00 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Killing child process in ksh
I have a script that (ideally) starts tcpdump, sleeps a given number of seconds, then kills it.
When I do this for 10 seconds or and hour, it works fine. When I try it for 10 hours (the length I actually want) it just doesn't die, and will actually stick around for days. Relevant part of my script: secondstime=$(($HOURSRUN * 60 * 60)) tcpdump -ni hme0 -w ${LOGDIRECTORY}${LOGFILE}`date +%m%d`.log -F $EXPRESSIONFILE& sleep $secondstime kill %1 Using 'ps', I can see that sleep got the right number of seconds. My ksh version is: @(#)PD KSH v5.2.14 99/07/13.2 Any ideas or better ways to do this would be appreciated. |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|