Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Slackware This Forum is for the discussion of Slackware Linux.


  Search this Thread
Old 10-29-2004, 12:45 PM   #1
Registered: Jun 2004
Location: Nacogdoches, TX
Distribution: Ubuntu 7.04
Posts: 230

Rep: Reputation: 30
Question Is there a way to make a program create a pid file?

I have done some searching and can't seem to find an answer to this. There are some programs that I have running that I would like to start up again using cron if they were to crash. However, I don't know how to check whether or not a program is running unless there is a pid file(if there is a way to do this without using a pid file that would be good too). So my question is is there a way to force a program to create a pid file? Thanks for the help.
Old 10-29-2004, 12:59 PM   #2
Senior Member
Registered: Oct 2003
Location: Zurich, Switzerland
Distribution: Debian/unstable
Posts: 1,357

Rep: Reputation: 47
Atleast in debian there is a program called "start-stop-daemon" that does that.

Also you can do pidfile creation manually, eg.
sleep 60s &
echo $! > pidfile.of.sleep


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Named can't create .pid?!?!? morbo Linux - Networking 11 09-11-2006 03:53 AM
How can I create a pid file from a backgournd process that I start? Hackiller Linux - General 3 05-12-2004 03:37 PM
adsl-status can't read pppoe PID file with rp-pppoe program setup Smarvy Linux - Newbie 2 03-14-2004 12:35 AM
ERROR: Couldn't write pid to pid file lawrencegoodman Linux - Newbie 2 02-13-2004 09:05 PM
finding pid with program name durden2.0 Linux - Newbie 1 08-04-2003 09:38 PM > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 12:11 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration