• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Watch dog process in linux

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am calling shell script, using process builder in java. if any error triggered in script i am catching error line in a log file.

my script is doing 1) creating xml files .
2) gzip the file
3)export the created file from source to destination server.
4)After processing successful the file will be removed from source.
5) clean the process id

i am getting in log file like..
"line 449: 18520 Killed ( sleep $timeout; echo "${mainpid} TERMINATED"; kill -9 ${mainpid} >/dev/null 2>&1 )"

in shell script::
i am doing like this
local mainpid=$1
local timeout=$2
(sleep $timeout;echo "${mainpid} TERMINATED";kill -9 ${mainpid} >/dev/null 2>&1) &
TIMEOUTPID=$!

every thing processed successfully ,but i don't want to print message in the log file like above.
Please give me any advise.

Thanks in Advance..
Masthansha...


reply
    Bookmark Topic Watch Topic
  • New Topic