LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Which Linux (Debian) Process Flag Number are there (https://www.linuxquestions.org/questions/linux-newbie-8/which-linux-debian-process-flag-number-are-there-4175427649/)

eenduiker 09-17-2012 10:34 AM

Which Linux (Debian) Process Flag Number are there
 
Hi there,

I am reading in the Debian Squeeze ps man page that the only Process Flag numbers available on the distro is 1 and 4 or a summation there of. Is this really true that there is so little process flags on Debian?

I looked on my OSX unix install and there are many!

Why does some processes report a flag number of 0 if it is not listed in the man page? I would appreciate it if someone would point me to a clear definition of what Process Flag Numbers really are.

Thanks!

unSpawn 09-18-2012 09:57 PM

Quote:

Originally Posted by eenduiker (Post 4782369)
I looked on my OSX unix install and there are many!

The BSD part of the kernel that OS runs comes from FreeBSD. The FreeBSD manual page for 'ps' lists 30* Process Flags. Linux 3.5.4 lists 27* PF's.


Quote:

Originally Posted by eenduiker (Post 4782369)
I am reading in the Debian Squeeze ps man page that the only Process Flag numbers available on the distro is 1 and 4 or a summation there of. Is this really true that there is so little process flags on Debian?

Available to 'ps' you mean. Just like "security" or "stability" aren't the property of some Linux distribution as some would like you to believe, this isn't about Linux distribution or release (well, indirectly) either. Anyway, comparing nfo from the previous two links you see some PF's are related to process management (man section 2, the clone, fork and execve system calls) others have no equivalent ("I am kswapd") and others wouldn't benefit user land by exposing them**.


Quote:

Originally Posted by eenduiker (Post 4782369)
Why does some processes report a flag number of 0 if it is not listed in the man page?

It has neither PF_SUPERPRIV or PF_FORKNOEXEC set?


Quote:

Originally Posted by eenduiker (Post 4782369)
I would appreciate it if someone would point me to a clear definition of what Process Flag Numbers really are.

PF's tell the kernel it needs to do something extra (or not) like not mess with init, check privileges before fork()* or process memory requirements*. To make your head explode here's an example of the LKML figuring out how to deal with runaway setuid processes.


All times are GMT -5. The time now is 05:52 AM.