Hello everybody,

I have a Perl script in Unix which monitors the health of a server. and also
runs some other jobs in a infinite loop.

It forks children to monitor the health, and run other jobs. To maintain the
state it uses a hash mapped to shared memory so that the main script which is
the parent and all its children can look at the hash to check the status of the
system, before they perform their activities. 

In event of a failure of either the parent or any of it's children, the script
terminates all the running children and ends - a graceful exits happens and all
the zombie processes are removed. 

In fact the removal of zombies is performed routinely in the script through a
signal handler.

I have to port the same script on NT. And obviously I have to make a lot of
changes:

1.  Signal handling is not supported on NT.

2. The shared memory functions of Perl used in UNIX are not implememnted in Perl
on NT.

3.  Is it a good idea to use fork as the books (Dave Roth's Win32 Perl
scripting) talk of fork not being reliable. Or is there another way to create
child processes and monitor their exit codes, terminate them in case of faults
and reap the zombies.

Pls. Note:  I am using Perl 5.6

I aslo read about using Amine's MemMap module and saw a few references to it in
questions asked in this forum. I am unable to get the Module from the website as
the the zip is missing. 

Can anyone advise me with an alternative or provide me with some hints.

Thanks,

Ashish Tiwari
Integrated Decisions and Systems.
e-mail: [EMAIL PROTECTED] 

_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users

Reply via email to