Thank you, now my perl daemon works with /etc/inittab
I've removed fork() and used this line:
pref:3:respawn:/bin/su -c '/usr/local/pref/pref.pl >/tmp/pref.txt 2>&1' nobody
Regards
Alex
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/
On 6/2/2011 3:36 PM, Alexander Farber wrote:
> I'll omit fork() and run my script from /etc/inittab as
>
> pref:3:respawn:/bin/su -c '/usr/local/pref/pref.pl' nobody 2>&1>
> /tmp/pref.txt
>
> Do you think I still need setsid(); chdir("/"); and umask(0); ?
Not sure about the setsid() - I think y
2011/6/2 Alexander Farber :
> On Thu, Jun 2, 2011 at 10:10 PM, Les Mikesell wrote:
>> On 6/2/2011 2:46 PM, Alexander Farber wrote:
>>>
>>> The Perl server poll()s TCP-sockets and forks
>>> only once - at the startup by calling this method:
>>>
>>> sub daemonize {
>>> die "Can not for
I'll omit fork() and run my script from /etc/inittab as
pref:3:respawn:/bin/su -c '/usr/local/pref/pref.pl' nobody 2>&1 > /tmp/pref.txt
Do you think I still need setsid(); chdir("/"); and umask(0); ?
Regards
Alex
___
CentOS mailing list
CentOS@centos.o
On Thu, Jun 2, 2011 at 10:10 PM, Les Mikesell wrote:
> On 6/2/2011 2:46 PM, Alexander Farber wrote:
>>
>> The Perl server poll()s TCP-sockets and forks
>> only once - at the startup by calling this method:
>>
>> sub daemonize {
>> die "Can not fork: $!\n" unless defined (my $child =
On 6/2/2011 2:46 PM, Alexander Farber wrote:
>
> The Perl server poll()s TCP-sockets and forks
> only once - at the startup by calling this method:
>
> sub daemonize {
> die "Can not fork: $!\n" unless defined (my $child = fork());
> # the parent should die
> exit 0
Alexander Farber wrote:
> Hello fellow CentOS sysadmins,
>
> I run a small multiplayer card game
> with around 500 users at peak times.
>
> The client is in Flash and the server is in Perl.
> My Perl daemon runs mostly stable, but
> approx. once a week it can crash with a
>
> May 29 11:06:46 m
Hello fellow CentOS sysadmins,
I run a small multiplayer card game
with around 500 users at peak times.
The client is in Flash and the server is in Perl.
The Perl server binds to port 8080, i.e. only
1 instance of it can be started (important detail).
The Perl server poll()s TCP-sockets and for
8 matches
Mail list logo