Commit 31d2262
committed
fix(process): serialize child ownership handoff
Keep the old leader's children index and every child parent link in one tasklist-like relationship transaction during non-leader exec.
Make release select the current real parent and remove the matching children entry under the same lock, preventing stale virtual PIDs when child reap races the handoff. Reuse the locked reparent helper and remove the now-redundant wrapper.
Signed-off-by: longjin <longjin@dragonos.org>1 parent 2ef2c6d commit 31d2262
3 files changed
Lines changed: 39 additions & 32 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
510 | 510 | | |
511 | 511 | | |
512 | 512 | | |
513 | | - | |
514 | | - | |
515 | | - | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
516 | 519 | | |
517 | 520 | | |
518 | 521 | | |
| |||
532 | 535 | | |
533 | 536 | | |
534 | 537 | | |
| 538 | + | |
| 539 | + | |
535 | 540 | | |
536 | 541 | | |
537 | | - | |
538 | | - | |
| 542 | + | |
539 | 543 | | |
540 | | - | |
| 544 | + | |
541 | 545 | | |
542 | 546 | | |
543 | 547 | | |
| |||
546 | 550 | | |
547 | 551 | | |
548 | 552 | | |
549 | | - | |
550 | 553 | | |
551 | 554 | | |
552 | 555 | | |
553 | 556 | | |
554 | 557 | | |
555 | 558 | | |
| 559 | + | |
556 | 560 | | |
557 | 561 | | |
558 | 562 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
540 | 540 | | |
541 | 541 | | |
542 | 542 | | |
543 | | - | |
544 | | - | |
545 | | - | |
546 | | - | |
547 | | - | |
548 | | - | |
549 | | - | |
550 | | - | |
551 | | - | |
552 | | - | |
553 | | - | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
554 | 560 | | |
555 | | - | |
556 | | - | |
557 | | - | |
558 | | - | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
559 | 565 | | |
560 | 566 | | |
561 | 567 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1013 | 1013 | | |
1014 | 1014 | | |
1015 | 1015 | | |
1016 | | - | |
1017 | | - | |
1018 | | - | |
1019 | | - | |
1020 | | - | |
1021 | | - | |
1022 | | - | |
1023 | | - | |
1024 | 1016 | | |
1025 | 1017 | | |
1026 | 1018 | | |
| |||
1045 | 1037 | | |
1046 | 1038 | | |
1047 | 1039 | | |
1048 | | - | |
| 1040 | + | |
| 1041 | + | |
| 1042 | + | |
| 1043 | + | |
| 1044 | + | |
| 1045 | + | |
1049 | 1046 | | |
1050 | 1047 | | |
1051 | 1048 | | |
| |||
1067 | 1064 | | |
1068 | 1065 | | |
1069 | 1066 | | |
1070 | | - | |
| 1067 | + | |
1071 | 1068 | | |
1072 | 1069 | | |
1073 | 1070 | | |
| |||
0 commit comments