9

What happens to a child process whose parent process is terminated abruptly without waiting? Does the child process die too?

Jess
  • 2,943
  • 3
  • 26
  • 40
kc3
  • 4,173
  • 6
  • 19
  • 15
  • How to make child process die after parent exits? See http://stackoverflow.com/questions/284325/how-to-make-child-process-die-after-parent-exits – Klas Lindbäck Jul 29 '15 at 07:50

2 Answers2

13

The child gets reparented to init.

Ignacio Vazquez-Abrams
  • 740,318
  • 145
  • 1,296
  • 1,325
  • And, to add to this, that means you need not fear about it walking as a living dead (zombie), because init waitpids. – Damon Apr 16 '11 at 23:14
3

No, it becomes 'orphaned' (i.e. its parent becomes init - PID 1).

trojanfoe
  • 118,129
  • 19
  • 204
  • 237