Re: Shelling?

From: Daniel Koepke (dkoepke@california.com)
Date: 01/18/97


On Sat, 18 Jan 1997, Dave wrote:

> Hey, it's the "original poster." I, of course, have the account password.  I
> was just thinking that if I could set up a shell command it would only shell
> to certain places:
> i.e. perhaps builders would get their own dir, and that would be all they
> could access, and imps get more access, but not all, etc. etc.
> Would this system lag badly?

You would, as posted before, need to create a link between a socket
and pseudo-terminals, which is not the easiest code to write, but
is the only non-blocking method I'm familiar with.  Calling the
'system' command is bad, because it blocks all pending input/output,
thus making it look like the MUD is lagged for as long as the system
command is executing (and when you're using a shell, that could be
a long time).  Anyway, if you use the method suggested previously
(spawning children and having them route input and output to your
parent and grand-child), you will probably get some lag, although that
really depends upon how nice of a machine you have.  Since fork'ing
off child processes creates duplicates of the parent (and thus using
the same amount of memory), it's likely that three processes on a
system with only 4mb of RAM will cause swapping...

Of course, it also depends upon how much memory the parent is truly
using.  My MUD used ~3mb with code, world files, player files, etc.
(after optimization), therefore I need a machine with at least 12mb
to fork off the three processes and still leave room for whatever
else I want to do.

Don't take me for accuracy in this area... I just woke up.


--
Daniel Koepke
dkoepke@california.com
Forgive me father, for I am sin.


+-----------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
|   http://cspo.queensu.ca/~fletcher/Circle/list_faq.html   |
+-----------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/18/00 PST