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.
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.
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
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
:
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
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
-- 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
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
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
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
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]
[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
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
[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
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
[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
[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
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]
/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
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
- 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
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
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
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
24 matches
Mail list logo