On Friday 11 December 2009 04:34:04 pm IƱaki Baz Castillo wrote:
> This is good because this means that in Debian it can be stopped with the
> command:
> 
>   start-stop-daemon --stop --name py_program
[snip]
> So I cannot use "start-stop-daemon --stop --name rb_program" because it
>  would find no process names "rb_program"

This is probably not a good idea in the first place -- it means you can't have 
separate copies of the program running, and start/stop them independently, to 
say nothing of the possibility that some other program might share the same 
name.

Since you're using start-stop-daemon anyway, why don't you make a pidfile?

start-stop-daemon --start --startas /home/ibc/rb_program --make-pidfile --
pidfile /var/run/rb_program.pid --background

If your program is backgrounding itself already, configure it to create its 
own pidfile -- shouldn't be too hard. Then you can do this instead:

start-stop-daemon --stop --pidfile /var/run/rb_program.pid

> So, is there some way to force the process to appear as "rb_program" in
> /proc/PID/status?

I'd like to know that, too, because it'd be useful for things like killall 
when things get out of hand. But even if there was, this is still the wrong 
approach -- your start-stop-daemon command is sort of equivalent to killall, 
which is a really blunt instrument.