Re: system(buf) question/plee for help

From: George (greerga@DRAGON.HAM.MUOHIO.EDU)
Date: 10/13/97


On Mon, 13 Oct 1997, Daniel Koepke wrote:

>On Mon, 13 Oct 1997, Matt Hess wrote:
>
>-+    sprintf(buf, "../newmap/cartograph %s %d %s ", CARTO_FILE,
>-+GET_OLC_ZONE(ch), buf);
>
>It's very doubtful you want to do this.  You see, sprintf(buf....)
>will start to write to buf before it reaches the end, so you're
>not getting the desired affect of appending the information you
>want.  Change it to use arg for the argument instead of buf.

Another reason you wouldn't want to do this is because while that command
is running, the MUD will freeze. (Assuming you use system.)  Append a & or
use nice like autowiz does.

--
George Greer  -  Me@Null.net   | Genius may have its limitations, but stupidity
http://www.van.ml.org/~greerga | is not thus handicapped. -- Elbert Hubbard


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



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