vcmbox -> mbox
[AROS.git] / compiler / autoinit / commandname.c
blobd7a839d2ba13f71ee89e396b9ab0f9ea2bbb62db
1 /*
2 Copyright © 1995-2014, The AROS Development Team. All rights reserved.
3 $Id$
4 */
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)
19 if (!_CommandName)
21 struct Task *me = FindTask(NULL);
24 * TODO:
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;
34 return _CommandName;