Commit f7c336f
committed
WIP: Forward parent death to descendant processes (unix)
If the forker's connection to the parent BEAM is broken or closed, react
by killing all spawned children. When a spawned port is closed, kill
the associated OS process.
A concise demonstration of the problem being solved is to run the
following command with and without the patch, then kill the BEAM.
Without the patch, the "sleep" process will continue:
erl -noshell -eval 'os:cmd("sleep 60")'
TODO:
* Needs a decision made between killing the process or process group.
* Separate patch for win321 parent 68cf02a commit f7c336f
File tree
2 files changed
+27
-0
lines changed- erts
- emulator/sys/unix
- preloaded/src
2 files changed
+27
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
183 | 183 | | |
184 | 184 | | |
185 | 185 | | |
| 186 | + | |
| 187 | + | |
186 | 188 | | |
187 | 189 | | |
188 | 190 | | |
| |||
571 | 573 | | |
572 | 574 | | |
573 | 575 | | |
| 576 | + | |
574 | 577 | | |
575 | 578 | | |
576 | 579 | | |
| |||
579 | 582 | | |
580 | 583 | | |
581 | 584 | | |
| 585 | + | |
582 | 586 | | |
583 | 587 | | |
584 | 588 | | |
| |||
621 | 625 | | |
622 | 626 | | |
623 | 627 | | |
| 628 | + | |
624 | 629 | | |
625 | 630 | | |
626 | 631 | | |
| |||
660 | 665 | | |
661 | 666 | | |
662 | 667 | | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
663 | 685 | | |
664 | 686 | | |
665 | 687 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7475 | 7475 | | |
7476 | 7476 | | |
7477 | 7477 | | |
| 7478 | + | |
| 7479 | + | |
| 7480 | + | |
| 7481 | + | |
| 7482 | + | |
7478 | 7483 | | |
7479 | 7484 | | |
7480 | 7485 | | |
| |||
0 commit comments