Anything between those is your program
...which while block buffered, on my box is optimized into a single write() system call ;-)
strace perl -le 'INIT{ print "About to start running code" }
END{print "code ending"}
print "hello"' 2>&1 | less
execve("/usr/bin/perl", ["perl", "-le", "INIT{ print \"About to start
+runn"...], [/* 51 vars */]) = 0
brk(0) = 0x1bc9000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
+0) = 0x7fc0fdf2f000
...
rt_sigaction(SIGIO, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGSYS, NULL, {SIG_DFL, [], 0}, 8) = 0
write(1, "About to start running code\nhell"..., 46About to start runn
+ing code
hello
code ending
) = 46
exit_group(0) = ?
+++ exited with 0 +++
I wished only half of the programs in my linux distro were half as good as the perl optimizer. Not to mention the stuff I am perlpetrating :) |