View previous topic :: View next topic |
Author |
Message |
bigV Tux's lil' helper
Joined: 05 Dec 2002 Posts: 102 Location: Southampton, UK
|
Posted: Sat Jan 18, 2003 12:42 pm Post subject: incorrect pid in --pidfile using --make-pidfile in rc-script |
|
|
I have created an rc-script file to start/stop a daemon. When I use --make-pidfile in conjunction with start-stop-daemon, the pid written to the file I specify is the real pid -1
i.e. a ps -auxww returns 4288 but --make-pidfile writes 4287 to the pid file. Hence when I come to use start-stop-daemon --pidfile, the pid is incorrect and I get an error stating so!!
Any Ideas
Thanks |
|
Back to top |
|
|
slartibartfasz Veteran
Joined: 29 Oct 2002 Posts: 1462 Location: Vienna, Austria
|
Posted: Sat Jan 18, 2003 3:01 pm Post subject: |
|
|
this may be due to forking of the process - some demons fork when they are started so u have to kill the 'next' process, however u cant count on this - the quick and very(!) dirty solution is to simply add '1' to the pid you try to kill... _________________ To an engineer the glass is neither half full, nor half empty - it is just twice as big as it needs to be. |
|
Back to top |
|
|
|