Right (cryptic output IMHO):
maasha@mao:~/scratch$ strace -p 18272
Process 18272 attached - interrupt to quit
write(8, “\2764571\t4605\t5_GQbZ3ywXsN1/1\t7\t-\n”, 31) = ? ERESTARTSYS
(To be restarted)
— SIGINT (Interrupt) @ 0 (0) —
write(4, “!”, 1) = 1
— SIGVTALRM (Virtual timer expired) @ 0 (0) —
rt_sigreturn(0x1a) = 1
rt_sigreturn(0x2) = -1 EINTR (Interrupted system
call)
close(9) = 0
open("/proc/self/maps", O_RDONLY) = 9
getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM_INFINITY}) =
0
fstat(9, {st_mode=S_IFREG|0444, st_size=0, …}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
= 0x7fd49ea35000
read(9, “7fd49d0d0000-7fd49d0df000 r-xp 0”…, 1024) = 1024
read(9, " /usr/local/lib/ruby/2"…, 1024) = 1024
read(9, "0000 08:01 260629 "…, 1024) = 1024
read(9, “400000 rw-p 00003000 08:01 26062”…, 1024) = 1024
read(9, “:00 0 \n7fd49e824000-7fd49e844000”…, 1024) = 1024
read(9, "fff64280000 rw-p 00000000 00:00 "…, 1024) = 231
close(9) = 0
munmap(0x7fd49ea35000, 4096) = 0
sched_getaffinity(18272, 32, {ffff, 0, 0, 0}) = 32
write(2, “./pipes.rb:50:in write'", 24) = 24 write(2, ": ", 2) = 2 write(2, "Interrupt", 9) = 9 write(2, "\n", 1) = 1 write(2, "\tfrom ./pipes.rb:50:in
flush’\n”, 31) = 31
write(2, “\tfrom ./pipes.rb:50:in block (2"..., 49) = 49 write(2, "\tfrom ./pipes.rb:50:in
each’\n”, 30) = 30
write(2, “\tfrom ./pipes.rb:50:in block in"..., 38) = 38 write(2, "\tfrom ./pipes.rb:49:in
open’\n”, 30) = 30
write(2, “\tfrom ./pipes.rb:49:in cat'\n", 29) = 29 write(2, "\tfrom ./pipes.rb:43:in
run’\n”, 29) = 29
write(2, “\tfrom ./pipes.rb:27:in block in"..., 38) = 38 write(2, "\tfrom /usr/local/lib/ruby/gems/2"..., 103) = 103 write(2, "\tfrom /usr/local/lib/ruby/gems/2"..., 87) = 87 write(2, "\tfrom /usr/local/lib/ruby/gems/2"..., 98) = 98 write(2, "\tfrom /usr/local/lib/ruby/gems/2"..., 94) = 94 write(2, "\tfrom /usr/local/lib/ruby/gems/2"..., 86) = 86 write(2, "\tfrom /usr/local/lib/ruby/gems/2"..., 86) = 86 write(2, "\tfrom ./pipes.rb:27:in
run’\n”, 29) = 29
write(2, “\tfrom ./pipes.rb:67:in `’\n”, 32) = 32
rt_sigaction(SIGINT, {SIG_IGN, [], SA_RESTORER|SA_SIGINFO,
0x7fd49e617030}, {0x7fd49eb2d6f0, [], SA_RESTORER|SA_SIGINFO,
0x7fd49e617030}, 8) = 0
rt_sigaction(SIGINT, {SIG_DFL, [], SA_RESTORER|SA_SIGINFO,
0x7fd49e617030}, {SIG_IGN, [], SA_RESTORER|SA_SIGINFO, 0x7fd49e617030},
8) = 0
close(7) = 0
close(8) = 0
write(4, “!”, 1) = 1
munmap(0x7fd49e926000, 1052672) = 0
rt_sigaction(SIGINT, {SIG_DFL, [INT], SA_RESTORER|SA_RESTART,
0x7fd49d9eb4f0}, {SIG_DFL, [], SA_RESTORER|SA_SIGINFO, 0x7fd49e617030},
8) = 0
tgkill(18272, 18272, SIGINT) = 0
— SIGINT (Interrupt) @ 0 (0) —
Process 18272 detached
maasha@mao:~/scratch$ strace -fp 18277
Process 18277 attached with 2 threads - interrupt to quit
[pid 18278] restart_syscall(<… resuming interrupted call …>
<unfinished …>
[pid 18277] write(8, “\2764571\t4605\t5_GQbZ3ywXsN1/1\t7\t-\n”, 31) = ?
ERESTARTSYS (To be restarted)
[pid 18277] — SIGINT (Interrupt) @ 0 (0) —
[pid 18277] write(4, “!”, 1 <unfinished …>
[pid 18278] <… restart_syscall resumed> ) = 1
[pid 18277] <… write resumed> ) = 1
[pid 18278] read(3, <unfinished …>
[pid 18277] rt_sigreturn(0x2 <unfinished …>
[pid 18278] <… read resumed> “!”, 1024) = 1
[pid 18277] <… rt_sigreturn resumed> ) = -1 EINTR (Interrupted system
call)
[pid 18278] read(3, <unfinished …>
[pid 18277] write(8, “\2764571\t4605\t5_GQbZ3ywXsN1/1\t7\t-\n”, 31
<unfinished …>
[pid 18278] <… read resumed> 0x7f2fc6d28020, 1024) = -1 EAGAIN
(Resource temporarily unavailable)
[pid 18278] read(5, 0x7f2fc6d28020, 1024) = -1 EAGAIN (Resource
temporarily unavailable)
[pid 18278] tgkill(18277, 18277, SIGVTALRM) = 0
[pid 18278] poll([{fd=3, events=POLLIN}], 1, 100 <unfinished …>
[pid 18277] <… write resumed> ) = ? ERESTARTSYS (To be
restarted)
[pid 18277] — SIGVTALRM (Virtual timer expired) @ 0 (0) —
[pid 18277] rt_sigreturn(0x1a) = -1 EINTR (Interrupted system
call)
[pid 18277] close(9) = 0
[pid 18277] open("/proc/self/maps", O_RDONLY) = 9
[pid 18277] getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024,
rlim_max=RLIM_INFINITY}) = 0
[pid 18277] fstat(9, {st_mode=S_IFREG|0444, st_size=0, …}) = 0
[pid 18277] mmap(NULL, 4096, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f2fc687f000
[pid 18277] read(9, “7f2fc4f1a000-7f2fc4f29000 r-xp 0”…, 1024) = 1024
[pid 18277] read(9, " /usr/local/lib/ruby/2"…, 1024) = 1024
[pid 18277] read(9, "0000 08:01 260629 "…, 1024) = 1024
[pid 18277] read(9, “24a000 rw-p 00003000 08:01 26062”…, 1024) = 1024
[pid 18277] read(9, “:00 0 \n7f2fc666e000-7f2fc668e000”…, 1024) = 1024
[pid 18277] read(9, "fff1d5fb000 rw-p 00000000 00:00 "…, 1024) = 231
[pid 18277] close(9) = 0
[pid 18277] munmap(0x7f2fc687f000, 4096) = 0
[pid 18277] sched_getaffinity(18277, 32, {ffff, 0, 0, 0}) = 32
[pid 18277] write(2, “./pipes.rb:50:in write'", 24) = 24 [pid 18277] write(2, ": ", 2) = 2 [pid 18277] write(2, "Interrupt", 9) = 9 [pid 18277] write(2, "\n", 1) = 1 [pid 18277] write(2, "\tfrom ./pipes.rb:50:in
flush’\n”, 31) = 31
[pid 18277] write(2, “\tfrom ./pipes.rb:50:in block (2"..., 49) = 49 [pid 18277] write(2, "\tfrom ./pipes.rb:50:in
each’\n”, 30) = 30
[pid 18277] write(2, “\tfrom ./pipes.rb:50:in block in"..., 38) = 38 [pid 18277] write(2, "\tfrom ./pipes.rb:49:in
open’\n”, 30) = 30
[pid 18277] write(2, “\tfrom ./pipes.rb:49:in cat'\n", 29) = 29 [pid 18277] write(2, "\tfrom ./pipes.rb:43:in
run’\n”, 29) = 29
[pid 18277] write(2, “\tfrom ./pipes.rb:27:in block in"..., 38) = 38 [pid 18277] write(2, "\tfrom /usr/local/lib/ruby/gems/2"..., 103) = 103 [pid 18277] write(2, "\tfrom /usr/local/lib/ruby/gems/2"..., 87) = 87 [pid 18277] write(2, "\tfrom /usr/local/lib/ruby/gems/2"..., 98) = 98 [pid 18277] write(2, "\tfrom /usr/local/lib/ruby/gems/2"..., 94) = 94 [pid 18277] write(2, "\tfrom /usr/local/lib/ruby/gems/2"..., 86) = 86 [pid 18277] write(2, "\tfrom /usr/local/lib/ruby/gems/2"..., 86) = 86 [pid 18277] write(2, "\tfrom ./pipes.rb:27:in
run’\n”, 29) = 29
[pid 18277] write(2, “\tfrom ./pipes.rb:67:in `’\n”, 32) = 32
[pid 18277] rt_sigaction(SIGINT, {SIG_IGN, [], SA_RESTORER|SA_SIGINFO,
0x7f2fc6461030}, {0x7f2fc69776f0, [], SA_RESTORER|SA_SIGINFO,
0x7f2fc6461030}, 8) = 0
[pid 18277] rt_sigaction(SIGINT, {SIG_DFL, [], SA_RESTORER|SA_SIGINFO,
0x7f2fc6461030}, {SIG_IGN, [], SA_RESTORER|SA_SIGINFO, 0x7f2fc6461030},
8) = 0
[pid 18277] close(7) = 0
[pid 18277] close(8) = 0
[pid 18277] write(4, “!”, 1 <unfinished …>
[pid 18278] <… poll resumed> ) = 1 ([{fd=3, revents=POLLIN}])
[pid 18277] <… write resumed> ) = 1
[pid 18278] read(3, <unfinished …>
[pid 18277] futex(0x7f2fc688a9d0, FUTEX_WAIT, 18278, NULL <unfinished
…>
[pid 18278] <… read resumed> “!”, 1024) = 1
[pid 18278] read(3, 0x7f2fc6d28020, 1024) = -1 EAGAIN (Resource
temporarily unavailable)
[pid 18278] read(5, 0x7f2fc6d28020, 1024) = -1 EAGAIN (Resource
temporarily unavailable)
[pid 18278] _exit(0) = ?
Process 18278 detached
<… futex resumed> ) = 0
munmap(0x7f2fc6770000, 1052672) = 0
rt_sigaction(SIGINT, {SIG_DFL, [INT], SA_RESTORER|SA_RESTART,
0x7f2fc58354f0}, {SIG_DFL, [], SA_RESTORER|SA_SIGINFO, 0x7f2fc6461030},
8) = 0
tgkill(18277, 18277, SIGINT) = 0
— SIGINT (Interrupt) @ 0 (0) —
Process 18277 detached