Path: utzoo!attcan!uunet!mcvax!ukc!stc!stl!scott
From: scott@stl.stc.co.uk (Mike Scott)
Newsgroups: comp.os.vms
Subject: Re: Print symboints
Message-ID: <757@acer.stl.stc.co.uk>
Date: 31 May 88 10:47:38 GMT
References: <880526-223840-3902@Xerox>
Reply-To: scott@stl.stc.co.uk (Mike Scott)
Organization: STL,Harlow,UK.
Lines: 25


 Concerning writing print symbionts, Gray.OSBUSouth@Xerox.COM wrote:

>	If you need to output some message during the course of running
>	the symbiont you should use either SYS$SNDOPR or SYS$BRKTHRU
>	to output the message.  Never ever use SYS$OUTPUT, SYS$ERROR
>	or SYS$INPUT in a symbiont.  A somewhat subtle way that you could
>	be using one of these files would be by a routine signaling an error
>	that is not handled by a condition handler; FORTRAN will do this
>

I have just been writing a symbiont in C, and encountered this
problem. C programs are all assumed to have a stdout, and this gets
closed even if you don't use it - which actually crashes the job
controller with an EOF written to its mailbox. Cure was to set an exit
ast, close all needed files explictly and call sys$delprc before the C
runtime system could do anything. Nasty, but it works. The problem is
anything but obvious!

Why do DEC assumed that anyone writing in C wants a u*x - like
environment? It causes quite a few problems like this one.

-- 
Regards. Mike Scott (scott@stl.stc.co.uk  ...uunet!mcvax!ukc!stl!scott)
phone +44-279-29531 xtn 3133.