Re: [MacOS] Autorun script

From: Dean Takemori (dean@UHHEPH.PHYS.HAWAII.EDU)
Date: 07/13/98


"d. hall" <dhall@OOI.NET> wrote:

>I'm guessing some of the particulars in program launching are specific to
>perl 5 for the mac?

The entire LauchParam(), LaunchApplication() and Process{} stuff
is 100% MacPerl specific.  The documentation I have says that
the LaunchParam() interface changed in MacPerl 5.1.4r4.  The
current ports (5.1.9 and 5.2.x) are based on 5.004 core, which
is why I specify that version.  MacPerls based on 5.003 _might_
work.

Just as some background, fork() and exec() don't really make sense,
under MacOS, nor does piping stdout/stderr, so trying

open(SERVER, ":bin:circle $flags $port |");

isn't going to work.  The hack-around I used is to launch
the program and then check the process table every 60 seconds
to see if it's still around.  Not particularly elegant, but
someone might find the whole thing useful.

Just as a last note:  The current versions of MacOS lack memory
protection, so if the MUD has died because of a bus or segmentation
fault, the entire machine should be rebooted.  This script should
be safe as long as the MUD has quit because of a godcommand or
a quit from the console.

-d


     +------------------------------------------------------------+
     | 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/15/00 PST