![]() |
|
|
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 |
| How to Kill a Process | bennichan | SUN Solaris | 5 | 03-24-2008 02:14 AM |
| kill process | ust | UNIX for Advanced & Expert Users | 1 | 11-27-2007 01:06 PM |
| kill(0,-9) don't kill the process | umen | High Level Programming | 9 | 06-19-2007 07:09 AM |
| how to start a process and make it sleep for 5 mins and then kill that process | shrao | Shell Programming and Scripting | 6 | 03-27-2007 01:54 PM |
| When kill doesnt work, how to kill a process ? | VijayHegde | UNIX for Advanced & Expert Users | 3 | 05-12-2006 05:24 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Process KILL
Hi All,
i wrote a shell script in unix, which intern runs java code, which will process the text file for 2 minutes. Senario : After 30 seconds of processing the file, sombody executed a command kill -9 <PID> which killed my process, i.e, my java code stop processing the file and my application got exit. Issue : Now i am unable to know what happened to my application. if someone kills my application, i want to log it into a log file saying <PID> GOT KILLED. Can anybody help me with a piece of code, which i can put in the shell script after my java application starts, so that if my java application gets KILL, it can go into that condition: Ex. : if (<PID> KILLED) "<PID> GOT KILLED" > LOG.TXT What can i put in the place of bold text in the above if statement. Regards, Ravi |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|