[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] Runtime AES application name change?



>> 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.