fork - How are PIDs generated on Ubuntu? -


i've wrote program forks 1 process. child process displays "hi" 200 times. father process says he's father. i've printed out both pids. when run program multiple times, see parent's pid stays same, normal. don't understand why child's pid keeps getting incremented 2, , 2. question: standard method of pid generation in ubuntu? incrementing 2?

pids happen handed out monotonically increasing in linux 2.6, why matter get? don't rely on specific behavior. if there skip of +2 might because process happened spawn child. or because +1 have reached pid in use.


Comments

Popular posts from this blog

WPF: binding viewmodel property of type DateTime to Calendar inside ItemsControl -

java - Getting corefrences with Standard corenlp package -

jQuery clickable div with working mailto link inside -