I glanced through perlport and README.vms alike, yet remain unclear
as to how much VMS supports the myriad Unix-style IPCish syscall
facilities and related practices.  Is there some other document
that describes this in better detail somewhere?

I was wondering whether VMS supports any of the following constructs,
and if so, whether there are any noteworthy variations from the
expected Unix models.  (Note: Some of these are *no*great*loss* if
missing, and perhaps even a feature. :-)

0. sysopen w/ normal O_* flags, especially O_EXCL (any specials?)

1. flock()  (don't semantics differ; eg, mandatory?)

2. Running command in system (or exec) and backticks

    system("cmd arg1 arg2")         # possible shell intervention
    system("cmd", "arg1", "arg2")   # unmolested execvp

    $answer = `cmd args 2>&1`           # snag stderr, too
    $answer = `cmd args 2>/dev/null`;   # discards stderr

3. Pipe open()s

    open(TO_PIPE, "|cmd")
    open(FROM_PIPE, "cmd|")

    use IPC::Open2;
    open2(FROM_PIPE, TO_PIPE, "cmd")

    use IPC::Open3;
    open3(TO_PIPE, FROM_PIPE, FROM_ERR, "cmd")

4. Explicit pipes

    pipe(PIPE1, PIPE2)

5. Fork open()s

    open(TO_MYSELF, "|-")
    open(FROM_MYSELF, "-|")

6. Explicit forks

        if (defined($pid = fork) { parent()       }
        elsif (!defined $pid)    { die "fork: $!" } 
        else                     { child()        }

7. Making copies of existing filehandles (&)

    open(OUTCOPY, ">&STDOUT")           
    open(INCOPY,  "<&STDIN" )   

8. Making aliases through existing file descriptors (&=)

    open(OUTALIAS, ">&=STDOUT") 
    open(INALIAS, "<&=STDIN")   
    open(BYNUMBER, ">&=5")      # fdopen(5, "w")

9. Sockets

    * Domains: Internet (AF_INET) and Unix (AF_UNIX aka AF_LOCAL)
    * Protocols: TCP, UDP, raw IP, (etc?)
    * socketpair for double pipes

10. Named pipes (FIFOs)

11. SysV IPC: messages, shared memory, semaphores

Also, if under VMS I print "\n" down an output pipe or socket, does
the other side get one byte or two, and if so, which?  What about
reading?  

thanks very much,

--tom

Reply via email to