Notes
This function is in beta test. Please help improve it in the issues
here.
pwd: /out/package ppid: 12394 1: WRITELN sleep 10 2: CTRL+C Scan child pids of ppid: 12394 SIGINT Send signal 2 to pid: 12394 Scan child pids of ppid: 12395 Send signal 2 to pid: 12395 Scan child pids of ppid: 12396 Send signal 2 to pid: 12396 Scan child pids of ppid: 12397 Send signal 2 to pid: 12397 3: WRITELN echo 123 > 1.txt 4: WRITELN sleep 10 > 1.txt 5: CTRL+C Scan child pids of ppid: 12394 SIGINT Send signal 2 to pid: 12394 Scan child pids of ppid: 12395 Send signal 2 to pid: 12395 Scan child pids of ppid: 12402 Send signal 2 to pid: 12402 Scan child pids of ppid: 12397 Send signal 2 to pid: 12397 Scan child pids of ppid: 12398 Send signal 2 to pid: 12398 Scan child pids of ppid: 12399 Send signal 2 to pid: 12399 Scan child pids of ppid: 12400 Send signal 2 to pid: 12400 Scan child pids of ppid: 12403 Send signal 2 to pid: 12403 6: WRITELN cat 1.txt 7: WRITELN echo success 8: CTRL+C Scan child pids of ppid: 12394 SIGINT Send signal 2 to pid: 12394 Scan child pids of ppid: 12395
Hints
Your answer may be identical to the JOJ answer in the first several lines.
However, you will still get Wrong Answer because the complete output may be longer and there might be errors in the future lines.
Please double check your code to solve this problem and try again.
Your Answer
mumsh $ mumsh $ mumsh $ mumsh $ mumsh $ success mumsh $ mumsh $ ================================================================= ==12428==ERROR: LeakSanitizer: detected memory leaks Direct leak of 32 byte(s) in 2 object(s) allocated from: #0 0x4dd0a0 (/out/package/mumsh_memory_check+0x4dd0a0) #1 0x51b9a3 (/out/package/mumsh_memory_check+0x51b9a3) #2 0x5192f8 (/out/package/mumsh_memory_check+0x5192f8) #3 0x7fae7be03b96 (/lib/x86_64-linux-gnu/libc.so.6+0x21b96) Indirect leak of 64 byte(s) in 1 object(s) allocated from: #0 0x4dd520 (/out/package/mumsh_memory_check+0x4dd520) #1 0x51ba98 (/out/package/mumsh_memory_check+0x51ba98) #2 0x5192f8 (/out/package/mumsh_memory_check+0x5192f8) #3 0x7fae7be03b96 (/lib/x86_64-linux-gnu/libc.so.6+0x21b96) Indirect leak of 24 byte(s) in 1 object(s) allocated from: #0 0x4dd520 (/out/package/mumsh_memory_check+0x4dd520) #1 0x51df89 (/out/package/mumsh_memory_check+0x51df89) #2 0x5192f8 (/out/package/mumsh_memory_check+0x
JOJ Answer
mumsh $ mumsh $ mumsh $ mumsh $ mumsh $ success mumsh $ mumsh $ exit