Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

Re: how to make a demon in perl?

by Dog and Pony (Priest)
on Oct 01, 2002 at 08:18 UTC ( #201938=note: print w/replies, xml ) Need Help??

in reply to how to make a demon in perl?

Personally, I use the way described here more or less, and just add the script to the startup (remember to make it executable). The main program then exists while the forked copy continues as a daemon.

Otherwise, it should be enough to just add the script to your startup with a '&' afterwards to put it in the background, no need to have any shell script in between (as long as you have a correct shebang line, that is the #!/usr/bin/perl one in the start of your script. I think. :)

You have moved into a dark place.
It is pitch black. You are likely to be eaten by a grue.

Replies are listed 'Best First'.
Re: Re: how to make a demon in perl?
by Chmrr (Vicar) on Oct 01, 2002 at 09:25 UTC

    Check out Proc::Daemon for something that does the aforementioned steps for you.

    perl -pe '"I lo*`+$^X$\"$]!$/"=~m%(.*)%s;$_=$1;y^`+*^e v^#$&V"+@( NO CARRIER'

Re: Re: how to make a demon in perl?
by Sihal (Pilgrim) on Oct 01, 2002 at 08:25 UTC
    COOL that is a very simple yet much better than what I was about to do, thx.
    by the way, how do I edit my questions ?
    (i'd like to change the title)
      Just go to the node in question. You can't edit all of them though, like the root node of a SoPW and a few others.

      Makeshifts last the longest.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://201938]
[Discipulus]: marto also Re^2: Catalyst:: Dispatcher - usage of expand_actions has signature polemic, and yesterday was quoted in CB
[marto]: Discipulus concerned partys should report things. as tye mentioned in his post (linked in the other thread from yesterday) there is an approach and strategy for such things

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (8)
As of 2017-06-23 08:46 GMT
Find Nodes?
    Voting Booth?
    How many monitors do you use while coding?

    Results (538 votes). Check out past polls.