[Gambas-user] My programm name of process

Benoît Minisini gambas at ...1...
Fri Oct 5 15:35:39 CEST 2012


Le 05/10/2012 08:18, abbat a écrit :
>
> Hi,
> Current process name of my program is "gbr3".
> So, if I have two and more  running  program of gambas I cant kill one
> process.
> "killall gbr3" kills all running gambas programs.
> Is it possible to change a process name of gambas program?
>
> Thank you.
>
>

Officially this is not possible, and I think there is a security reason 
behind that.

There are hacks that modify the memory allocated at program startup that 
includes the environment and the program arguments (`argc` and `argv` in 
C) ; `ps` uses that for displaying process names.

But they are hacks and they work only on Linux, so I won't implement them.

Anyway, there are some solutions :

- Using symbolic links.

- Learn to use pkill with regular expressions: the gambas executable 
name is always 'gbr3', but you will find the gambas executable name in 
its arguments.

Regards,

-- 
Benoît Minisini




More information about the User mailing list