At 09:53 AM 5/8/2001 +0100, [EMAIL PROTECTED] wrote:

>>I'm trying to port a set of perl test harness's from NT/Unix to OpenVMS
>and
>>most things seem to be ok , file io, system  but not fork?
>
>What I'm trying to do is port a process control module, which creates a
>process , then asks it to run a specific command ( normally a java class),
>captures it output and error.
>The unix flavour uses Open3 which does not work on OpenVMS.

[snip]

>One of my big problems is my inability to understand the VMS documentation,
>as it seems to say that fork, exec are supported.

Er, OpenVMS C RTL documentation or Perl on VMS documentation?  Perhaps 
things can be cleared up by unpacking Dan's comprehensive but cryptic comment:

>VMS doesn't fork. 

That is, Perl on VMS does not implement Perl's fork() function because most 
Unixy uses of fork() make assumptions that won't work on VMS, so it seemed 
better to skip it than to offer something that wouldn't work the way people 
expect.

>We could open it up if the next call was to exec (which 
>will work) but that's about it.

That is, we could make Perl's fork() on VMS work just like the C RTL's 
fork() on VMS, which is to say that a fork() immediately followed by an 
exec() will work.  However, most Unix-style uses of fork() assume that you 
are already executing in the child after the fork() and before the exec(), 
and anything you do in there (like cloning output files) won't do what you 
expect it to on VMS.

Once upon a time Charles Lane suggested that open3() could be implemented on 
top of his piping code, but no one accepted the dare, so as far as I know it 
hasn't been done.

You might very well be able to do what you want by opening a pipe as long as 
you don't need both read and write access to the child.

Reply via email to