jmolloy / pedigree

Pedigree operating system
http://pedigree.googlecode.com
ISC License
89 stars 5 forks source link

'logout' over ssh doesn't end ssh connection #12

Closed dbittman closed 10 years ago

dbittman commented 10 years ago

Typing 'logout' or ctrl-d keeps the connection alive, you can still type, but nothing happens.

miselin commented 10 years ago

This is a regression somewhere, this has worked in the past.

miselin commented 10 years ago

This is a race condition where:

  1. Process begins terminating, sending SIGCHLD to parent.
  2. Parent handles SIGCHLD by calling waitpid() with WNOHANG.
  3. Parent returns without reaping any PIDs.
  4. Process completes termination, is now ready to be reaped.
miselin commented 10 years ago

This is now fixed.