On Fri, 2006-07-07 at 14:54 -0700, Richard Fish wrote:
> On 7/7/06, Uwe Thiem <[EMAIL PROTECTED]> wrote:
> > How about:
> >
> > getenv( "_" );
> 
> Well, that is set by bash before it exec's anything, so that should
> work, provided the program[s] are always exec'd by bash and not by
> something else.  It would be nicer if "_" was set by the kernel, or
> even glibc.

well, they are forked by start-stop-daemon in an init script at the
moment, which is in turn run by /sbin/runscript, which is run by bash...

as to why: Firstly there are various log message functions defined that
print the name of the program calling the log function, the log message
(and then do some other stuff depending on what type of message -
critical, info, etc).  Secondly, and more importantly, no task should
have multiple copies of itself running, or "bad things" will happen
(there's quite a bit of shared memory which would get corrupted).  And
some tasks require that a whole list of other tasks are not running.
QNX used to have some functions to register a name with the system to
stop this (qnx_name_locate, etc), but linux doesn't... that I can see...

cya,
-- 
Iain Buchanan <iaindb at netspace dot net dot au>

Having the fewest wants, I am nearest to the gods.
                -- Socrates

-- 
gentoo-user@gentoo.org mailing list

Reply via email to