Notes
This function is in beta test. Please help improve it in the issues
here.
pwd: /out/package ppid: 79624 1: WRITELN sleep 10 2: CTRL+C Scan child pids of ppid: 79624 SIGINT Send signal 2 to pid: 79624 Scan child pids of ppid: 79625 Send signal 2 to pid: 79625 Scan child pids of ppid: 79627 Send signal 2 to pid: 79627 3: WRITELN echo 123 > 1.txt 4: WRITELN sleep 10 > 1.txt 5: CTRL+C Scan child pids of ppid: 79624 SIGINT Send signal 2 to pid: 79624 Scan child pids of ppid: 79625 Send signal 2 to pid: 79625 Scan child pids of ppid: 79630 Send signal 2 to pid: 79630 6: WRITELN cat 1.txt 7: WRITELN echo success 8: CTRL+C Scan child pids of ppid: 79624 SIGINT Send signal 2 to pid: 79624 Scan child pids of ppid: 79625 Send signal 2 to pid: 79625 Scan child pids of ppid: 79633 Send signal 2 to pid: 79633 9: WRITELN exit exit: 1
Hints
Your answer may be identical to the JOJ answer in the first several lines.
However, the main problem you meet now is Runtime Error. And the exit code of your program is 1, which should be 0.
Please double check your code to solve this problem and try again.
Your Answer
mumsh $ AddressSanitizer:DEADLYSIGNAL ================================================================= ==79625==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x7f585dc5fd60 bp 0x58f936f66ca3f448 sp 0x58f936f66ca3f448 T0) ==79625==The signal is caused by a READ memory access. ==79625==Hint: address points to the zero page. AddressSanitizer:DEADLYSIGNAL AddressSanitizer: nested bug in the same thread, aborting.
JOJ Answer
mumsh $ mumsh $ mumsh $ mumsh $ mumsh $ success mumsh $ mumsh $ exit