Re: Daemon that starts other Daemons

2004-09-24 Thread Bob Showalter
Errin Larsen wrote: Ok ... so with some research and playi^H^H^H^H^Htesting I've found the answer to what's really been bothering me. If you *really* want to understand the nuts and bolts of all this, Stevens' _Advanced Programming in the UNIX Environment_ is a must.

Re: Daemon that starts other Daemons

2004-09-24 Thread John W. Krahn
Bob Showalter wrote: Errin Larsen wrote: Ok ... so with some research and playi^H^H^H^H^Htesting I've found the answer to what's really been bothering me. If you *really* want to understand the nuts and bolts of all this, Stevens' _Advanced Programming in the UNIX Environment_ is a must.

Daemon that starts other Daemons

2004-09-23 Thread Errin Larsen
the perlipc docs and I found this handy code on proper daemonization: use POSIX 'setsid'; sub daemonize { #it's polite for daemons to chdir to root so that they #don't prevent a filesystem from being unmounted chdir '/' or die Can't chdir to /: $!; #it's also polite for daemons

Re: Daemon that starts other Daemons

2004-09-23 Thread Errin Larsen
On Thu, 23 Sep 2004 11:23:16 -0500, Errin Larsen [EMAIL PROTECTED] wrote: Hi perl-people, SNIP So, my question is, how do I implement this code WITHOUT the parent process dieing? --Errin I found that (at least on the Solaris OS that I'm working on) that the setsid function will setup a

Re: Daemon that starts other Daemons

2004-09-23 Thread Wiggins d Anconia
: Great docs... however... use POSIX 'setsid'; sub daemonize { #it's polite for daemons to chdir to root so that they #don't prevent a filesystem from being unmounted chdir '/' or die Can't chdir to /: $!; #it's also polite for daemons to redirect all output to #/dev

Re: Daemon that starts other Daemons

2004-09-23 Thread Wiggins d Anconia
On Thu, 23 Sep 2004 11:23:16 -0500, Errin Larsen [EMAIL PROTECTED] wrote: Hi perl-people, SNIP So, my question is, how do I implement this code WITHOUT the parent process dieing? --Errin I found that (at least on the Solaris OS that I'm working on) that the setsid function

Daemon that starts other Daemons

2004-09-23 Thread Errin Larsen
-- Forwarded message -- From: Errin Larsen [EMAIL PROTECTED] Date: Thu, 23 Sep 2004 16:30:21 -0500 Subject: Re: Daemon that starts other Daemons To: Wiggins d Anconia [EMAIL PROTECTED] Hi again, Ok ... so with some research and playi^H^H^H^H^Htesting I've found the answer

Re: Daemon that starts other Daemons

2004-09-23 Thread Wiggins d Anconia
Another Module (hmph, JAM, that works pretty well in the glue analogy ;-)). Also, I realized that the ORIGINAL parent needs to die (So as to disassociate the daemons from the calling terminal/process), but I was looking for a daemon that would run, start other servers, and that hang around

Re: Daemon that starts other Daemons

2004-09-23 Thread Chris Devers
On Thu, 23 Sep 2004, Errin Larsen wrote: [] I was looking for a daemon that would run, start other servers, and that hang around monitoring them. In other words, you want something that works like Apache [1.x]. * To launch Apache, you run apachectl, a shell script. * apachectl

Re: Daemon that starts other Daemons

2004-09-23 Thread Wiggins d Anconia
not help you here, but it's the model you're looking for. -- Chris Devers If you really want to get into it, Network Programming with Perl has excellent coverage of various common types of daemons and how to write them in Perl. Don't know if you have the resources or time

daemons ???

2003-02-08 Thread km
hi all, how to write daemons in perl ? does it have such a support ? if so which module should i use? kindly enlighten me -- thanks in advance -- KM -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: daemons ???

2003-02-08 Thread Wiggins d'Anconia
[EMAIL PROTECTED] wrote: hi all, how to write daemons in perl ? does it have such a support ? if so which module should i use? kindly enlighten me -- thanks in advance -- First question, do you want a daemon as in a process that is started, then exec's a new process without a controlling

Re: daemons ???

2003-02-08 Thread km
On Sat, 8 Feb 2003, Wiggins d'Anconia wrote: [EMAIL PROTECTED] wrote: hi all, how to write daemons in perl ? does it have such a support ? if so which module should i use? kindly enlighten me -- thanks in advance -- First question, do you

Re: daemons ???

2003-02-08 Thread Wiggins d'Anconia
[EMAIL PROTECTED] wrote: Hi, well to make it clear -- i need to make a server -- a constantly running process -- suppose if i want to get a daily report of the frequency of all the users logging in and out on the system from the daemon written in perl -- how do i do that ? thanks, KM You

Re: daemons ???

2003-02-08 Thread km
Hi all, well i really need a server :-) thanks, KM On Sat, 8 Feb 2003, Wiggins d'Anconia wrote: [EMAIL PROTECTED] wrote: Hi, well to make it clear -- i need to make a server -- a constantly running process -- suppose

Re: daemons ???

2003-02-08 Thread Wiggins d'Anconia
[EMAIL PROTECTED] wrote: Hi all, well i really need a server :-) thanks, KM Still confused as to why, but ok... How will your clients be connecting to the server? I would suggest having a look at: perldoc -f fork perldoc -f

Re: daemons ???

2003-02-08 Thread Rob Dixon
[EMAIL PROTECTED] wrote: Hi all, well i really need a server :-) thanks, KM Hi K. I really think you ought to come clean on what you're actually trying to do to give Wiggins (and the rest of us) a sporting chance of helping you :) The bottom line is that you can write a daemon in any

daemons

2002-11-28 Thread Mailing lists
i do not even know where to start. Is there a writing perl daemons how to somewhere in the net? If not, where can i find some guideline about this topic? Thanks in advance. Gabriele -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: daemons

2002-11-28 Thread NYIMI Jose (BMB)
/Net/Server.pm José. -Original Message- From: Mailing lists [mailto:[EMAIL PROTECTED]] Sent: Thursday, November 28, 2002 1:42 PM To: [EMAIL PROTECTED] Subject: daemons Hi ppl... this is my first post, so i really do not know if this one is out of topic... i suppose it ain't

daemons are not simple or for the feint of heart was - Re: Automate the running of my script

2002-04-17 Thread drieux
On Wednesday, April 17, 2002, at 11:55 , Chas Owens wrote: [..] Oopsy, forgot the sleep call. That is what I get for just posting code without testing it first. Well, I did say something like this grin /. Maybe it should look more like this (actually it shouldn't, you _should use cron or

Re: daemons are not simple or for the feint of heart was - Re:Automate the running of my script

2002-04-17 Thread Chas Owens
- setting process group Id, et al. If you don't use STDIN/STDOUT/STDERR then you don't need to worry. Daemons should only use STDIN/STDOUT/STDERR on failure to start up or interactive mode. given that you did not provide a means to 'stop' your almost like a daemon... nor, for that matter provided

Daemons

2001-11-19 Thread Daniel Falkenberg
Hey all, I am working with daemons at the moment. What I want to know is... 1 - Is it possbile for my script to report a message everytime my program dies. My program currently runs as a daemon. Sometimes I get up in the morning and the program (Perl deamon) isn't running any more. Thx, Dan

Re: Perl Daemons

2001-09-01 Thread Dwight Lemaire
it on but if I do a ps aux on my system it tells me I am still running the damon script? How do I go about stopping this script... Regards, Daniel Falkenberg #!/usr/bin/perl -w #Testing daemons use POSIX qw(setsid); chdir '/' or die Can't chdir to /: $!; umask 0

Perl Daemons

2001-08-31 Thread Daniel Falkenberg
about stopping this script... Regards, Daniel Falkenberg #!/usr/bin/perl -w #Testing daemons use POSIX qw(setsid); chdir '/' or die Can't chdir to /: $!; umask 0; open STDIN, '/dev/null' or die Can't read /dev/null: $!; #open STDOUT, '/dev/null' or die Can't write to /dev/null