Record Case Detail

Notes

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

Stderr

 pwd: /out/package
ppid: 128936
   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: 128936
SIGINT
Send signal 2 to pid: 128936
Scan child pids of ppid: 128937
Send signal 2 to pid: 128937
Scan child pids of ppid: 128958
Send signal 2 to pid: 128958
   3: CTRL+C
Scan child pids of ppid: 128936
SIGINT
Send signal 2 to pid: 128936
Scan child pids of ppid: 128937
Send signal 2 to pid: 128937
Scan child pids of ppid: 128961
Send signal 2 to pid: 128961
   4: WRITELN echo success
   5: CTRL+C
Scan child pids of ppid: 128936
SIGINT
Send signal 2 to pid: 128936
Scan child pids of ppid: 128937
Send signal 2 to pid: 128937
Scan child pids of ppid: 128964
Send signal 2 to pid: 128964
   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 Time Exceeded. 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 $ /in/read.c:31:29: runtime error: unsigned integer overflow: 0 - 1 cannot be represented in type 'unsigned long'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /in/read.c:31:29 in 
=================================================================
==128937==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x619000000982 at pc 0x000000517b62 bp 0x7fff4bb89150 sp 0x7fff4bb89148
READ of size 1 at 0x619000000982 thread T0
    #0 0x517b61  (/out/package/mumsh_memory_check+0x517b61)
    #1 0x5159f9  (/out/package/mumsh_memory_check+0x5159f9)
    #2 0x7fae5d9e7b96  (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)
    #3 0x41d1e9  (/out/package/mumsh_memory_check+0x41d1e9)

0x619000000982 is located 0 bytes to the right of 1026-byte region [0x619000000580,0x619000000982)
allocated by thread T0 here:
    #0 0x4dd0a0  (/out/package/mumsh_memory_check+0x4dd0a0)
    #1 0x5177a9  (/out/package/mumsh_memory_check+0x5177a9)
    #2 0x5159f9  (/out/package/mumsh_memory_check+0x5159f9)
    #3 0x7fae

JOJ Answer

mumsh $ 123

mumsh $ 
mumsh $ success
mumsh $ 
mumsh $ exit