LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 10-29-2004, 11:45 AM   #1
blk96gt
Member
 
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, 11:59 AM   #2
ToniT
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.
Code:
sleep 60s &
echo $! > pidfile.of.sleep
 
  


Reply


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 02:53 AM
How can I create a pid file from a backgournd process that I start? Hackiller Linux - General 3 05-12-2004 02:37 PM
adsl-status can't read pppoe PID file with rp-pppoe program setup Smarvy Linux - Newbie 2 03-13-2004 11:35 PM
ERROR: Couldn't write pid to pid file lawrencegoodman Linux - Newbie 2 02-13-2004 08:05 PM
finding pid with program name durden2.0 Linux - Newbie 1 08-04-2003 08:38 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 03:14 AM.

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