Record Case Detail

Notes

This function is in beta test. Please help improve it in the issues here.

Stderr

 pwd: /out/package
ppid: 4381
   1: WRITELN sleep 10 | sleep 10 | sleep 10 | sleep 10 | sleep 10 | sleep 10 | sleep 10 | sleep 10 | sleep 10 | echo 123
   2: CTRL+C
Scan child pids of ppid: 4381
SIGINT
Send signal 2 to pid: 4381
Scan child pids of ppid: 4382
Send signal 2 to pid: 4382
Scan child pids of ppid: 4383
Send signal 2 to pid: 4383
Scan child pids of ppid: 4384
Send signal 2 to pid: 4384
Scan child pids of ppid: 4385
Send signal 2 to pid: 4385
   3: CTRL+C
Scan child pids of ppid: 4381
SIGINT
Send signal 2 to pid: 4381
Scan child pids of ppid: 4382
Send signal 2 to pid: 4382
Scan child pids of ppid: 4390
Send signal 2 to pid: 4390
   4: WRITELN echo success
   5: CTRL+C
Scan child pids of ppid: 4381
SIGINT
Send signal 2 to pid: 4381
Scan child pids of ppid: 4382
Send signal 2 to pid: 4382
Scan child pids of ppid: 4394
Send signal 2 to pid: 4394
   6: 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 $ 123

mumsh $ 
mumsh $ success
mumsh $ 
mumsh $ 
=================================================================
==4382==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 1024 byte(s) in 32 object(s) allocated from:
    #0 0x4dcbb0  (/out/package/mumsh_memory_check+0x4dcbb0)
    #1 0x5191a9  (/out/package/mumsh_memory_check+0x5191a9)
    #2 0x7fdeebddab96  (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)

SUMMARY: AddressSanitizer: 1024 byte(s) leaked in 32 allocation(s).

JOJ Answer

mumsh $ 123

mumsh $ 
mumsh $ success
mumsh $ 
mumsh $ exit