2 Copyright © 1995-2014, The AROS Development Team. All rights reserved.
6 #include <exec/tasks.h>
7 #include <proto/exec.h>
9 #include "autoinit_intern.h"
12 * We can be called several times.
13 * In order to avoid unneeded hassle we cache our result here.
15 static char *_CommandName
= NULL
;
17 char *___get_command_name(struct ExecBase
*SysBase
)
21 struct Task
*me
= FindTask(NULL
);
25 * In AROS task's name always corresponds to command name.
26 * However at least on AmigaOS v3 this is not true for CLI
27 * proceses. In this case process name is still 'Shell process',
28 * and command name is placed in cli_CommandName
29 * P.S. I may remember something wrong - Pavel Fedin
31 _CommandName
= me
->tc_Node
.ln_Name
;