[comp.os.vms] MAIL from a network process

BMW6957@TAMCHEM.BITNET (Brad Wilson) (04/29/87)

>I have a DECnet task running asynchronously which I would like to
>monitor indirectly (i.e. not typing NETSERVER.LOG to see if it's
>done yet, or SHOW PROC, etc.) by having it send me mail. However,
>the mail message does not come through, nor is an error generated.
>...
>The process starts up MAIL, but does not send anything, and appears to
>`hang'.

MAIL operates in two modes, depending on its environment.  It can operate
as a "sender" or a "receiver", the actual mode depends on its environment.
When sending mail across DECnet, MAIL operates in sending mode on the local
node and requests connection to the MAIL object on the remote node.  MAIL
on the remote node detects that it is a network process and switches to
receive mode to handle the mail on behalf of the sender.  If you try to
invoke MAIL from a network process, MAIL will assume that it has been
invoked due to a network MAIL request, switch to receive mode, and thus
"hang" the process.  I think the best you'll be able to do is spawn
MAIL as a subprocess (if that works, I haven't tried it) or have your
process submit a batch job to send the mail.

Brad Wilson
Department of Chemistry
Texas A&M University
BMW6957@TAMCHEM.BITNET