|
|
|
running for beginners Creating PID file
|
|
|
This may be a bit advanced for a beginner's group, but I need to have my _script_ create a pidfile. I'm running a monitor app that keeps track of what is running and notifies me when stuff stops. It does it by comparing the pid in the pidfile with ps. So, I need my _script_ to create a pidfile when it starts. Ideas appreciated. Thanks, Michael
|
|
|
|
|
|
|
The administrator has disabled public write access. |
|
|
|
running for beginners Creating PID file
|
|
|
This may be a bit advanced for a beginner's group, but I need to have my _script_ create a pidfile. I'm running a monitor app that keeps track of what is running and notifies me when stuff stops. It does it by comparing the pid in the pidfile with ps. So, I need my _script_ to create a pidfile when it starts. Ideas appreciated. This is far more than a beginners' group, but your post is heavy with Unix terminology. Remember that this is a cross-platform group. I know that a PID is a process ID, and I can imagine what a 'pidfile' might be, but 'comparing the pid in the pidfile with ps' is nonsense. Explain the problem, and we will help to solve it. Rob
|
|
|
|
|
|
|
The administrator has disabled public write access. |
|
|
|
running for beginners Creating PID file
|
|
|
So, I need my _script_ to create a pidfile when it starts. There's not trick for creating a pid file in Perl. You can say, my $pid = $$; open my $fd,'', /path/program.pid or die $!; print $fd $pid; close $pid or die $!; at the begin of the _script_. And at the END block of the _script_ you should delete the pid file when _script_ was exiting: END { un_link_ /path/program.pid if $$ = $pid; }
|
|
|
|
|
|
|
The administrator has disabled public write access. |
|
|
|
running for beginners Creating PID file
|
|
|
}
|
|
|
|
|
|
|
The administrator has disabled public write access. |
|
|
|
running for beginners Creating PID file
|
|
|
Hello guys, I want to start learning about sql and how it interacts w/ perl. My rough idea is to install mysql server and read some books to start playing w/ it along w/ perl. Any advice? For now, I just plan to go through the book 'mysql and perl for the web'.... If someone can post some excellent site relates to mysql and perl.. would be appreciated. I will post related questions along the way(also, please let me know if this is not the right mailing list for this and if something exists that I am not aware of at this point) thanks!!
|
|
|
|
|
|
|
The administrator has disabled public write access. |
|
|
|
running for beginners Creating PID file
|
|
|
Hello guys, I want to start learning about sql and how it interacts w/ perl. My rough idea is to install mysql server and read some books to start playing w/ it along w/ perl. Any advice?
|
|
|
|
|
|
|
The administrator has disabled public write access. |
|