freelanceprogrammers.org Forum Index » Perl
making daemon
Joined: 20 May 2005
Posts: 1
making daemon
Hi:
I`m making a daemon for linux, but this daemon stop if any error occurs.
¿How can I to do that this daemon do not stop never?
Thanks and sorry for my bad English.
Antonio Sala
Joined: 20 May 2005
Posts: 1
making daemon
Wrap the part that errors with eval
eval
{
open (FILE, "somefile.that.doesnot.exist");
close(FILE)
};
-----Original Message-----
From: perl_official@yahoogroups.com
[mailto:perl_official@yahoogroups.com] On Behalf Of
antonioantonioantonioantonio
Sent: Thursday, May 19, 2005 3:26 PM
To: perl_official@yahoogroups.com
Subject: [Perl] making daemon
Hi:
I`m making a daemon for linux, but this daemon stop if any error occurs.
¿How can I to do that this daemon do not stop never? Thanks and sorry
for my bad English. Antonio Sala
Yahoo! Groups Links
--
No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.11.12 - Release Date: 5/17/2005
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.11.12 - Release Date: 5/17/2005
Joined: 06 Apr 2005
Posts: 12
making daemon
> Hi:
> I`m making a daemon for linux, but this daemon stop if any error occurs.
> ¿How can I to do that this daemon do not stop never?
> Thanks and sorry for my bad English.
> Antonio Sala
Hi Antonio,
You can create a cron script which checks regular whether the script is
died, if it has then restart it.
Alternatively you can fork the process and catch the return from the child
process.
I would suggest the first, which would require no change in the current code
you have, just need to write a small script for cron.
Take care,
Paul Alapatt
________________________________________
Yahoo! Groups Links
• To visit your group on the web, go to:
http://groups.yahoo.com/group/perl_official/
• To unsubscribe from this group, send an email to:
perl_official-unsubscribe@yahoogroups.com
• Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
All times are GMT
Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Freelace Website Designer - Customer web design and software building.
China Wholesale - Electronics Products
Character Studio - Tutorials and Help
China Wholesale - Electronics Products
Character Studio - Tutorials and Help







