At 10:56 AM 2/23/00 -0500, Jordan Henderson wrote:
>I've gotten this to work by putting a IO$M_NOW on the WRITEOF:
>
>                 retsts = sys$qiow(0,chan,IO$_WRITEOF|IO$M_NOW,iosb,
>                           0,0,0,0,0,0,0,0);
>
>But, I'm not happy with this now.  The problem is that the status is checked
>from the iosb after this, and I could imagine a case where this would be not set
>yet and the iosb could still have an old value and this could turn up an error.
>Also, we may actually be interested in some iosb status at a later time, and
>making this a nowait write would mean we would have to implement a kludgy
>timeout for the WRITEOF to reasonably complete.  Sure, we could assume that it's
>going to finish in 5 seconds or something if the process is still there, but
>this is just sloppy coding.  After all, a system _could_ get busy and the child
>would be outswapped for a long period.

Perhaps I'm misunderstanding this, but I always thought that as long as you're doing a 
$qiow rather than a $qio, the iosb will be filled in properly when the call returns.  
Moreover, the I/O User's Guide says, "IO$M_NOW---Completes the I/O operation 
immediately with no wait for a write request from another process," which suggests 
that it just means we aren't waiting for another process before executing the I/O.  It 
doesn't mean we complete the I/O asynchronously in the current process. Sorry if I've 
misunderstood.

>It appears that the pipe is being opened as a RW mbx (new to some recent version
>of OpenVMS), so the perl has READ channels and WRITE channels on the mbx.  I
>could be wrong about this, but I have reason to believe it (I did an ANAL/SYS
>"SHO PROC/CHAN" on a perl that was hung and saw several channels assigned to the
>mailbox that it was trying to write the EOF to).  I don't see why this should be
>necessary.  It seems to me that a given pipe mbx should be either READ or WRITE,
>but not both.

I'm not sure I understand how you could have 2-way communication if the mailbox is not 
RW.  I don't know if vmsperl uses the pipe() function from the C RTL or cooks its own, 
but there is a description of how the parent and child communicate through a mailbox 
in the RTL version at:

<http://www.openvms.digital.com/commercial/c/5763p037.htm#index_x_1107>


_______________________________________________
Craig A. Berry                                   
mailto:[EMAIL PROTECTED]

Reply via email to