Subject: Re: Security 'n MOO 'n UNIX 'n stuff. (fwd)

From: Clay Luther <[email-masked]>
Date: Thu, 7 May 1992 19:29:36 -0700

Pavel Curtis (>) writes:

> James Powell says:
>    >Clay W. Luther writes:
>    >No, though we have thought about it.  However, judging from Pavel's opinion
>    >about extensions to moo, it would never be included in any of his upgrades.
> 
>    That is too bad.  What is Pavel's policy about including extensions to MOO
>    in future releases?
> 
> Clay is confused and overreacting to earlier messages of mine.  I welcome
> suggestions for server enhancements, all the more if they come with detailed
> specifications and/or working implementations.  Even if you send me code,
> though, and even if I agree that the provided functionality is a good idea, I
> don't promise to use your code or even your interface to that functionality.  I

I am neither confused nor overreacting and, in general, I would resent such
characterizations of my moods by someone who doesn't even know me.

My statement reflected my meager knowledge of how you think.  And rather
accurately.  I stated, in context of that message, that you would never include
that proposed extension to moo.  I think, as the rest of your reply indicates,
you agree with this assessment.

> It depends upon the functionality you want to provide to the MOO programmer.
> In any case, I must disagree with Clay's characterization of the mod as
> `trivial'.

A call out to unix is a trivial matter.  Why, however, you'd use system() 
I don't know.  A call out to unix from within moo is not as trivial as a
system() call, of course, but it is *not* difficult.

Give me credit, Pavel.  You aren't the only proferssional unix programmer
alive.

The solution *is* trivial, conceptually.  The code is not that difficult,
either, ie, trivial.  It's my job to write chunks of code that can do 
*precisely* what the original poster described.  Do you think you know my job 
better than I do, Pavel?  I'm sorry if I was under the misconception that
Unix made such ipc easy.

> The simplest interface I can imagine is to reflect the ANSI C `system()'
> procedure in MOO as a built-in function.  That is, you could say
> 	system("cp foo bar")

Simple, and borderline innane, for the obvious reasons you stated.

> 	+ There is no provision for giving input to the command or getting
> 	  output back.  One could, I suppose, take a list-of-strings argument

Ever heard of signals?  
Ever heard of pipes?  
Ever heard of sockets?  
Ever heard of forking? 
I know you have.  I have, too, and I can think up many wonderful incantations
using these tools.

Refer to pages 108-109, 170 and Chapter 6 in Unix Network Programming 
(Stevens) for clues.

These are the basic tools for the unix programmer.

So, sorry about the tirade, but I don't like being mischaracterized or 
slandered, or being told something contrary to what I know is true.  And 
contrary to what you may be thinking, I am not angry.  Just downright annoyed.

-- 
Clay W. Luther                  [email-masked]
System Manager                  Center for Network Neuroscience
University of North Texas       PO Box 5218 Denton, Texas 76203
817/565-3896,3472               aka. Malraux@GodNet (Bushashuru!)

---

From: [email-masked] (Jeff d'Arcy)
Date: Fri, 8 May 1992 10:44:28 -0700

>Date: Fri, 8 May 92 12:28:04 CDT
>From: Jay A. Carlson <[email-masked]>
>Message-Id: <[email-masked]>
>Subject: Security 'n MOO 'n UNIX 'n stuff. (fwd)
>
>Jeff d'Arcy writes:
>> 2. Forking does avoid *one* of the problems Pavel mentioned - that of
>> stopping the server while the command executes.  When and where to
>> wait(2) for the forked process, however, may be a matter of some
>> delicacy.  More importantly, all the world's not UNIX.  MOO is, I
>> believe, supposed to run on DOS too.  Last time I looked, DOS didn't
>> have fork(2).  I'm sure we could debate for a while about the wisdom of
>> providing a UNIX-only feature in MOO.
>
>Although most of the MOO server appears to be quite portable, parts of
>it are targeted only at Unix.  Providing similar functionality can be
>troublesome.  bsd_network.c is, of course, not portable, and I seem to
>remember some odd BSDism in server.c.  fork is already used in the
>server to do checkpointing.  In the my Amiga and Zippy's MS-DOS port,
>the server does checkpointing in the main thread, and thus pauses for
>the duration of the checkpoint.
>
>Even though I am enthusiastic about the server running on operating
>systems other than BSD Unix, I don't want MOO development driven by
>the lowest common denominator.

Agreed.  It's a decision that should not be made blindly, lest we render MOO
(perhaps buildable but practically) unusable elsewhere, but I agree that some
UNIX-only features such as this one are probably desirable.

	jeff