agarsha has asked for the wisdom of the Perl Monks concerning the following question:
I am writing an abstraction layer for a Database/OS/System monitoring tool that is going to run on OpenVMS/Windows/UNIX(es).
One tricky piece that I will rub up against shortly is the inability to "fork()" with OpenVMS. (This I find quite crippling, now that I have begun to think UNIX-process-management-style.)
I want to fire off some time-consuming (Order{min}) tasks and I don't want to block on them... but, I will need to get their output.
On UNIX/Win, I am able to fork off some jobs and select on the reading end of their pipe(s) to see when the children are ready to talk.
On OpenVMS???, I am envisioning an ugly hack such as:
--Parent opens temp file (using File::Temp),
--Parent writes a perl script to the file (using Data::Dumper to dump objects into evals, etc.),
--Parent uses System() to submit the perl scripts to OpenVMS "Batch" for detached exec,
--Parent opens listening AF_INET (or preferably AF_UNIX if it works) Socket,
--Batch child does its stuff, then connects to Parent via socket, says its piece, and dies.
Comments? Better ideas? Code snippets? Anyone ever had to emulate forking with OpenVMS? Or tackle problem with completely different approach? Anyone ever written a tcp/ip server for VMS?... How the heck did you do it without forking any procs??
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: fork() emulation hack for OpenVMS
by Elian (Parson) on Mar 09, 2003 at 17:56 UTC | |
by agarsha (Acolyte) on Mar 09, 2003 at 19:09 UTC | |
by Anonymous Monk on Mar 09, 2003 at 19:09 UTC | |
by agarsha (Acolyte) on Mar 09, 2003 at 19:21 UTC | |
by Elian (Parson) on Mar 12, 2003 at 22:31 UTC |