Record Case Detail

Notes

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

Stderr

 pwd: /out/package
ppid: 28863
   1: WRITELN sleep 10 | echo 123
   2: CTRL+C
Scan child pids of ppid: 28863
SIGINT
Send signal 2 to pid: 28863
Scan child pids of ppid: 28864
Send signal 2 to pid: 28864
Scan child pids of ppid: 28865
Send signal 2 to pid: 28865
Scan child pids of ppid: 28866
Send signal 2 to pid: 28866
Scan child pids of ppid: 28867
Send signal 2 to pid: 28867
   3: WRITELN echo success
   4: 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 $ success
mumsh $ 
=================================================================
==28864==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 80 byte(s) in 1 object(s) allocated from:
    #0 0x4dcc40  (/out/package/mumsh_memory_check+0x4dcc40)
    #1 0x51774e  (/out/package/mumsh_memory_check+0x51774e)
    #2 0x517c5c  (/out/package/mumsh_memory_check+0x517c5c)
    #3 0x515251  (/out/package/mumsh_memory_check+0x515251)
    #4 0x7f2444f64b96  (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)

SUMMARY: AddressSanitizer: 80 byte(s) leaked in 1 allocation(s).

JOJ Answer

mumsh $ 123

mumsh $ success
mumsh $ exit