[m-dev.] diff: io__call_system/4

Fergus Henderson fjh at cs.mu.oz.au
Mon Oct 6 12:34:34 AEST 1997


Zoltan Somogyi, you wrote:
> 
> > I disagree completely.  This is useful information which a program should
> > be allowed to act on sensibly.
> > 
> > I agree, BTW, that the "final" version should throw an exception in this
> > case.
> > 
> > Perhaps a better interface for now is to return a type such as:
> > 
> > :- type io__system_result(T)
> > 	--->	ok(T)
> > 	;	signal(int)
> > 	;	error(io__error).
> 
> I think the predicate implemented in pragma C code should be exactly as it is
> in Chris's posting, but that the predicate should be internal to the module.
> There should be an exported version that translates the encoded integer
> into the type Andrew proposes; users of this predicate can write their own
> code to handle the case when the command was terminated by a signal. In case
> they do not wish to do so, there should be another exported predicate
> that also decodes the integer and aborts if it indicates termination by
> signal.

There's no need for it to abort; it would be better to do the same thing that
it does if the command couldn't be invoked, i.e. just return error(_).

-- 
Fergus Henderson <fjh at cs.mu.oz.au>   |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>   |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3         |     -- the last words of T. S. Garp.



More information about the developers mailing list