1 #include <exec/tasks.h>
2 #include <proto/exec.h>
4 #include "autoinit_intern.h"
7 * We can be called several times.
8 * In order to avoid unneeded hassle we cache our result here.
10 static char *_CommandName
= NULL
;
12 char *___get_command_name(struct ExecBase
*SysBase
)
16 struct Task
*me
= FindTask(NULL
);
20 * In AROS task's name always corresponds to command name.
21 * However at least on AmigaOS v3 this is not true for CLI
22 * proceses. In this case process name is still 'Shell process',
23 * and command name is placed in cli_CommandName
24 * P.S. I may remember something wrong - Pavel Fedin
26 _CommandName
= me
->tc_Node
.ln_Name
;