Home: Perl Programming Help: Win32 Programming Help:
perl script as Win32 service & HTTP Daemon



jbenezech
Novice

Jan 11, 2007, 2:22 AM


Views: 4619
perl script as Win32 service & HTTP Daemon

Hello everybody,

I've got an application with 2 main components: 1 written in Java and 1 HTTP server in perl.

I'd like to run a perl script as a windows service that would

1) fork to start the HTTP daemon

2) periodically call a java class

I want to implement the service and HTTP daemon in perl and not java to avoid mounting the JVM which uses too much memory for some PC.

I'm quite new to perl in windows and am not sure how to do the following:

- register the perl script as a windows service

- start the HTTP daemon in the background.

(I tried using exec() and system() but using exec() I loose the pid of the HTTP daemon which I will need to send SIGHUP signal and using system() the execution stops until the HTTP daemon dies.)

- create a timer/scheduler to call the Java class periodically.

Any help would be greatly appreciated.

Cheers,

Jerome