[TUHS] Pipes on Eunice
Warren Toomey via TUHS
tuhs at tuhs.org
Tue Dec 30 05:49:49 AEST 2025
----- Forwarded message from "G. Branden Robinson"
[CCing Warren so he can bounce my message to TUHS, with which GMail
seems to have an issue, if necessary]
At 2025-12-29T14:03:15-0500, Paul Winalski via TUHS wrote:
> As mentioned in the EUNICE doc excerpt quoted above, there is a size
> associated with VMS mailboxes and when the mailbox is full the process
> issuing the write operation is stalled until some data are read from
> the mailbox. This happens on Unix, too, with pipes. But on VMS the
> writing process is stalled in a particularly nasty way. It is placed
> into a resource wait state called RWMBX (resource wait mailbox full).
> When that happens the stalled process can't be deleted until it leaves
> RWMBX state. Your process hangs until some data are read from the
> mailbox. This can be nasty.
Sounds to me a bit like the Linux kernel's 'D' state for processes:
"uninterruptible wait". Woe betide you should that happen to a process
that has a file descriptor open on a file system you want to unmount.
> In the mid-1980s DEC did a port of the Unix Bourne shell to VMS. This
> was marketed under the name DEC Shell. We (VMS Languages and Software
> Development Tools Group) were aware of these two behavioral
> differences as well as other gotchas when you try to use mailboxes as
> pipes. We ended up cloning the mailbox device driver code and
> tweaking it to implement true Unix pipe behavior. It did not place
> your process into an uninterruptible resource wait state if the pipe
> filled up--you got a conventional wait-for-I/O-completion. I/O
> channels assigned to the pipe were tagged as read-only or write-only
> based on the first I/O operation done to them. This allowed for
> "broken pipe" detection. This pipe device driver shipped along with
> DEC Shell, which otherwise was non-privileged.
I wonder if Dave Cutler et al. brought VMS mailboxes to Windows NT with
this design flaw, remedied it, or went another direction with IPC.
Regards,
Branden
----- End forwarded message -----
More information about the TUHS
mailing list