2001-11-07 16:01:32

by Yaroslav Popovitch

[permalink] [raw]
Subject: "ps ax" shows init [


doing "ps ax" get such msg for kernel-2.4.9:
That is the same for kernel-2.4.12.Sometimes it is shown as it should be.
Is this a bug of kernel? It seems to be..

PID TTY STAT TIME COMMAND
1 ? S 0:06 init [

Cheers,YP



2001-11-07 16:10:30

by Miquel van Smoorenburg

[permalink] [raw]
Subject: Re: "ps ax" shows init [

In article <[email protected]>,
Yaroslav Popovitch <[email protected]> wrote:
>doing "ps ax" get such msg for kernel-2.4.9:
>That is the same for kernel-2.4.12.Sometimes it is shown as it should be.
>Is this a bug of kernel? It seems to be..
>
> PID TTY STAT TIME COMMAND
> 1 ? S 0:06 init [

It's because init doesn't have enough space in argv[] to change it's
process title. There are a number of causes for this, one indirect
one is pressing 'enter' at the 'LILO boot: ' prompt.

Mike.
--
"Only two things are infinite, the universe and human stupidity,
and I'm not sure about the former" -- Albert Einstein.

2001-11-07 22:09:37

by Phil Howard

[permalink] [raw]
Subject: Re: "ps ax" shows init [

Miquel van Smoorenburg wrote:

> In article <[email protected]>,
> Yaroslav Popovitch <[email protected]> wrote:
> >doing "ps ax" get such msg for kernel-2.4.9:
> >That is the same for kernel-2.4.12.Sometimes it is shown as it should be.
> >Is this a bug of kernel? It seems to be..
> >
> > PID TTY STAT TIME COMMAND
> > 1 ? S 0:06 init [
>
> It's because init doesn't have enough space in argv[] to change it's
> process title. There are a number of causes for this, one indirect
> one is pressing 'enter' at the 'LILO boot: ' prompt.

Perhaps a way around this frequent problem is to make execve() always
reserve a certain minimum amount of space in argv[] even if it is not
filled in with anything. Then instead a "brick wall" being set at
the end of the space originally used, it can be set at max(space used,
minimum reserved). This is still userland space, right? What would
be a reasonable figure for minimum reserved? Or does ld-linux go
grabbing space right after the end of argv[]?

--
-----------------------------------------------------------------
| Phil Howard - KA9WGN | Dallas | http://linuxhomepage.com/ |
| [email protected] | Texas, USA | http://phil.ipal.org/ |
-----------------------------------------------------------------