9

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

Jess
  • 2,991
  • 3
  • 27
  • 40
kc3
  • 4,281
  • 7
  • 20
  • 16
  • 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
  • 776,304
  • 153
  • 1,341
  • 1,358
  • 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
  • 120,358
  • 21
  • 212
  • 242