lkml.org 
[lkml]   [1996]   [Apr]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: ext2 attribute immutable
Date
In <m0u3rUL-0004CeC@a4dialup-3.ed.ac.uk> sct@dcs.ed.ac.uk writes:
> You don't need to. You can just do a ptrace() on init, or create your
> OWN init process --- by using a careful, controlled fork bomb we can
> easily create new processes until we are about to wrap pid, then kill
> init and wait until one of our forks has a pid of 1.

I had always assumed that it was common to wrap around to a pid that was
higher than 1 (possibly 300?). This means that you are more likely to
find a free pid, since the long running system daemons will have claimed
all the low pids (my machine with few daemons has 11% of the pids between
1 and 200 used).

This is a good feature of Linux -- I was able to look at kernel/fork.c
at determine the answer for Linux was 0x7fff for the maxpid and 1 for
wrappid (the value used after maxpid). I had to write a program that
ran on an otherwise idle Sun to determine the same parameters.

--
`O O' | Home: Nick.Holloway@alfie.demon.co.uk
// ^ \\ | Work: Nick.Holloway@parallax.co.uk http://www.parallax.co.uk/~alfie/


\
 
 \ /
  Last update: 2005-03-22 13:36    [W:0.102 / U:18.492 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site