From owner-mint@fishpool.com Thu Feb 13 00:46:09 2003 Message-ID: <010e01c2d2ef$a1c42c00$6e0963d9@blaszak> Reply-To: "Konrad Kokoszkiewicz" From: "Konrad Kokoszkiewicz" To: References: Subject: Re: [MiNT] Runtime AES application name change? Date: Thu, 13 Feb 2003 00:31:51 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2720.3000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-MIME-Autoconverted: from 8bit to quoted-printable by antyk.obta.uw.edu.pl id h1CNbo0l050882 Delivered-To: mint@fishpool.com Delivered-To: mint@lists.fishpool.fi X-ecartis-version: Ecartis v1.0.0 Sender: mint-bounce@lists.fishpool.fi Errors-to: mint-bounce@lists.fishpool.fi X-original-sender: draco@obta.uw.edu.pl Precedence: bulk List-help: List-unsubscribe: List-ID: X-List-ID: Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by prinz.cs.uni-magdeburg.de id h1CNk7h09662 >> You can fork the script interpreter, register the child in GEM and >> give it any name you want. Using fork() with GEM is difficult for >> principal reasons, but it can be done with special libraries. > > Do you mean the mt_aes? The new gemlib (the merge with mgemlib beeing > currently done) will have this ability. I think this may be the mt_aes, yes. I actually used own libraries for playing with that, but mt_aes will be fine I think. > But how to actually set the name of the child process? Could you point > me to some example code? Do you mean the name for a GEMDOS process (displayable with 'ps') or rather the name for an AES process? When you use fork(), there is no way of changing the name I can think of. Perhaps someone else could remind the method. When you create the child with Pexec(7)/Pexec(104), the name of the newly created process is passed as the second parameter of the Pexec(104), e.g. Pexec(104, (char *)"foobar", basepage_ptr, 0L); starts new process with the name "foobar" visible after you do "ps". The names for the AES processes, either for the "Desk" menu or for the appl_find()/appl_search() are set with menu_register(). The first argument decides which of these names are changed. I don't have any manual handy ATM, but I vaguely remember that the Atari's "TOS/MultiTOS release notes" should contain the related information. And "The Atari compendium" should have it as well (both under menu_register()). >> You can also use tfork() (a combination of Pexec(7) and Pexec(104)), >> but it wouldn't make it easier. > > tfork()? >> From the sources and their documentation it seems like 'create a >> thread'. > Real threads under MiNT (no process?)? No, the 'thread' the tfork() creates is a separate process. CVV -- Konrad M.Kokoszkiewicz http://draco.atari.org ** Ea natura multitudinis est, ** aut seruit humiliter, aut superbe dominatur (Liv. XXIV,25) ************************************************************* ** Taka to juz natura pospólstwa, albo sluzalczo sie plaszczy, ** albo bezczelnie sie panoszy.