[Toybox] mkroot works again, pending release.
Patrick Oppenlander
patrick.oppenlander at gmail.com
Tue Oct 20 17:14:53 PDT 2020
On Wed, Oct 21, 2020 at 11:02 AM Rob Landley <rob at landley.net> wrote:
>
>
>
> On 10/20/20 5:23 PM, Patrick Oppenlander wrote:
> > On Tue, Oct 20, 2020 at 10:58 AM Rob Landley <rob at landley.net> wrote:
> >>
> >> I got toysh implementing all the bits that mkroot's init script needs, so I
> >> expect to cut a release in the next couple days. There's still a zillion
> >> dangling threads but I should be able to park it for now.
> >>
> >> If anybody wants to holler about something I should fix now, this would be a
> >> good time. I'm back in tokyo working on $DAYJOB again, and am likely to down
> >> tools on toybox after the release for at least a couple months.
> >>
> >> I note that except for a couple large holes (lack of $((math)) and function()
> >> support, haven't finished trap/signal/jobs, needs command line editing and
> >> history) toysh is... sort of working now? Several known bugs (test suite
> >> failures), but it's actually starting to be actually run real scripts. Needs
> >> auditing for memory leaks, and the largest script I've thrown at it _is_ the
> >> mkroot init, but... it's advanced from "don't bother" to "object of curiosity".
> >>
> >> Right now, useful bug reports would come in the form of "thing I could add to
> >> tests/sh.test and get to later", and keep in mind I've got...
> >>
> >> $ wc sh.tests
> >> 845 3791 20673 sh.tests
> >>
> >> One or two of those already, not yet properly formatted into runnable regression
> >> tests. (And one of the current sh.test entries HANGS because a
> >> subshell-plus-redirection test fails to hand off a filehandle properly and we
> >> wait forever reading from nothing, so I need to teach tests to time out...)
> >>
> >> Rob
> >
> > Hi Rob,
> >
> > first, thanks for all the hard work!
> >
> > I had a go at using toysh instead of busybox ash and immediately ran into this:
> >
> > % ./toybox sh
> > $ for i in $(./toybox); do echo $i; done
> > $
>
> It ran for me?
>
> $ ./toybox sh -c 'for i in $(./toybox); do echo $i; done' | wc
> 211 211 1355
>
> > That seems to start an interactive subshell somehow (takes two ^D's to
> > quit) instead of looping.
>
> Hmmm, how do I reproduce this...
>
> Rob
Something strange is happening.
% ./toybox sh -c 'for i in $(./toybox); do echo $i; done' | wc
0 0 0
Also, it takes a long time.
% time ./toybox sh -c 'for i in $(./toybox); do echo $i; done'
./toybox sh -c 'for i in $(./toybox); do echo $i; done' 0.00s user
0.00s system 0% cpu 1.387 total
Here's a what I'm doing on my end:
% git describe --tags
0.8.3-197-g9c8b4051
% make allyesconfig
% make
% ./toybox sh -c 'for i in $(./toybox); do echo $i; done' | wc
0 0 0
Maybe an strace will help?
% strace ./toybox sh -c 'for i in $(./toybox); do echo $i; done' | wc
execve("./toybox", ["./toybox", "sh", "-c", "for i in $(./toybox); do
echo $i"...], 0x7ffce2875758 /* 72 vars */) = 0
brk(NULL) = 0x55ec73215000
arch_prctl(0x3001 /* ARCH_??? */, 0x7fff376bc750) = -1 EINVAL (Invalid argument)
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=282302, ...}) = 0
mmap(NULL, 282302, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f8135308000
close(3) = 0
openat(AT_FDCWD, "/usr/lib/libutil.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\320\23\0\0\0\0\0\0"...,
832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=14440, ...}) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x7f8135306000
mmap(NULL, 16400, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f8135301000
mmap(0x7f8135302000, 4096, PROT_READ|PROT_EXEC,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f8135302000
mmap(0x7f8135303000, 4096, PROT_READ,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x7f8135303000
mmap(0x7f8135304000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x7f8135304000
close(3) = 0
openat(AT_FDCWD, "/usr/lib/libcrypt.so.2", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0
\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=186112, ...}) = 0
mmap(NULL, 221736, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f81352ca000
mmap(0x7f81352cc000, 73728, PROT_READ|PROT_EXEC,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x7f81352cc000
mmap(0x7f81352de000, 102400, PROT_READ,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x14000) = 0x7f81352de000
mmap(0x7f81352f7000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2c000) = 0x7f81352f7000
mmap(0x7f81352f9000, 29224, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f81352f9000
close(3) = 0
openat(AT_FDCWD, "/usr/lib/libresolv.so.2", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\20G\0\0\0\0\0\0"...,
832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=92496, ...}) = 0
mmap(NULL, 104608, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f81352b0000
mprotect(0x7f81352b4000, 73728, PROT_NONE) = 0
mmap(0x7f81352b4000, 57344, PROT_READ|PROT_EXEC,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x4000) = 0x7f81352b4000
mmap(0x7f81352c2000, 12288, PROT_READ,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x12000) = 0x7f81352c2000
mmap(0x7f81352c6000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x15000) = 0x7f81352c6000
mmap(0x7f81352c8000, 6304, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f81352c8000
close(3) = 0
openat(AT_FDCWD, "/usr/lib/libcrypto.so.1.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0p\7\0\0\0\0\0"...,
832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=2986744, ...}) = 0
mmap(NULL, 3006384, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f8134fd2000
mmap(0x7f8135048000, 1724416, PROT_READ|PROT_EXEC,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x76000) = 0x7f8135048000
mmap(0x7f81351ed000, 593920, PROT_READ,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21b000) = 0x7f81351ed000
mmap(0x7f813527e000, 188416, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2ab000) = 0x7f813527e000
mmap(0x7f81352ac000, 16304, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f81352ac000
close(3) = 0
openat(AT_FDCWD, "/usr/lib/libz.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0
0\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=100096, ...}) = 0
mmap(NULL, 102416, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f8134fb8000
mprotect(0x7f8134fbb000, 86016, PROT_NONE) = 0
mmap(0x7f8134fbb000, 57344, PROT_READ|PROT_EXEC,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f8134fbb000
mmap(0x7f8134fc9000, 24576, PROT_READ,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x11000) = 0x7f8134fc9000
mmap(0x7f8134fd0000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17000) = 0x7f8134fd0000
close(3) = 0
openat(AT_FDCWD, "/usr/lib/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\220\202\2\0\0\0\0\0"...,
832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"...,
784, 64) = 784
pread64(3, "\4\0\0\0\20\0\0\0\5\0\0\0GNU\0\2\0\0\300\4\0\0\0\3\0\0\0\0\0\0\0",
32, 848) = 32
pread64(3, "\4\0\0\0\24\0\0\0\3\0\0\0GNU\0\207\360\21\247\344\314?\306\nT\320\323\335i\16t"...,
68, 880) = 68
fstat(3, {st_mode=S_IFREG|0755, st_size=2159552, ...}) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"...,
784, 64) = 784
mmap(NULL, 1868448, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f8134def000
mmap(0x7f8134e15000, 1363968, PROT_READ|PROT_EXEC,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f8134e15000
mmap(0x7f8134f62000, 311296, PROT_READ,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x173000) = 0x7f8134f62000
mmap(0x7f8134fae000, 24576, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1be000) = 0x7f8134fae000
mmap(0x7f8134fb4000, 12960, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f8134fb4000
close(3) = 0
openat(AT_FDCWD, "/usr/lib/libdl.so.2", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\20\22\0\0\0\0\0\0"...,
832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=18608, ...}) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x7f8134ded000
mmap(NULL, 20624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f8134de7000
mmap(0x7f8134de8000, 8192, PROT_READ|PROT_EXEC,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f8134de8000
mmap(0x7f8134dea000, 4096, PROT_READ,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f8134dea000
mmap(0x7f8134deb000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f8134deb000
close(3) = 0
openat(AT_FDCWD, "/usr/lib/libpthread.so.0", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0000\201\0\0\0\0\0\0"...,
832) = 832
pread64(3, "\4\0\0\0\24\0\0\0\3\0\0\0GNU\0\307Y\373z\3054\277z\21\35\225\341\273\304<\223"...,
68, 824) = 68
fstat(3, {st_mode=S_IFREG|0755, st_size=158744, ...}) = 0
mmap(NULL, 135600, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f8134dc5000
mmap(0x7f8134dcc000, 65536, PROT_READ|PROT_EXEC,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x7000) = 0x7f8134dcc000
mmap(0x7f8134ddc000, 20480, PROT_READ,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17000) = 0x7f8134ddc000
mmap(0x7f8134de1000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b000) = 0x7f8134de1000
mmap(0x7f8134de3000, 12720, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f8134de3000
close(3) = 0
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x7f8134dc2000
arch_prctl(ARCH_SET_FS, 0x7f8134dc2740) = 0
mprotect(0x7f8134fae000, 12288, PROT_READ) = 0
mprotect(0x7f8134de1000, 4096, PROT_READ) = 0
mprotect(0x7f8134deb000, 4096, PROT_READ) = 0
mprotect(0x7f8134fd0000, 4096, PROT_READ) = 0
mprotect(0x7f813527e000, 180224, PROT_READ) = 0
mprotect(0x7f81352c6000, 4096, PROT_READ) = 0
mprotect(0x7f81352f7000, 4096, PROT_READ) = 0
mprotect(0x7f8135304000, 4096, PROT_READ) = 0
mprotect(0x55ec719a0000, 12288, PROT_READ) = 0
mprotect(0x7f8135379000, 4096, PROT_READ) = 0
munmap(0x7f8135308000, 282302) = 0
set_tid_address(0x7f8134dc2a10) = 275888
set_robust_list(0x7f8134dc2a20, 24) = 0
rt_sigaction(SIGRTMIN, {sa_handler=0x7f8134dccb90, sa_mask=[],
sa_flags=SA_RESTORER|SA_SIGINFO, sa_restorer=0x7f8134dd90f0}, NULL, 8)
= 0
rt_sigaction(SIGRT_1, {sa_handler=0x7f8134dccc30, sa_mask=[],
sa_flags=SA_RESTORER|SA_RESTART|SA_SIGINFO,
sa_restorer=0x7f8134dd90f0}, NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024,
rlim_max=RLIM64_INFINITY}) = 0
getuid() = 1000
geteuid() = 1000
umask(000) = 027
umask(027) = 000
brk(NULL) = 0x55ec73215000
brk(0x55ec73236000) = 0x55ec73236000
openat(AT_FDCWD, "/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=3041392, ...}) = 0
mmap(NULL, 3041392, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f8134adb000
close(3) = 0
openat(AT_FDCWD, "/usr/share/locale/locale.alias", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=2998, ...}) = 0
read(3, "# Locale name alias data base.\n#"..., 4096) = 2998
read(3, "", 4096) = 0
close(3) = 0
openat(AT_FDCWD, "/usr/lib/locale/C.UTF-8/LC_CTYPE",
O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/locale/C.utf8/LC_CTYPE",
O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/locale/C/LC_CTYPE", O_RDONLY|O_CLOEXEC) =
-1 ENOENT (No such file or directory)
getuid() = 1000
geteuid() = 1000
umask(000) = 027
umask(027) = 000
rt_sigaction(SIGPIPE, {sa_handler=SIG_IGN, sa_mask=[PIPE],
sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x7f8134e2c6a0},
{sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
getpid() = 275888
getppid() = 275884
getuid() = 1000
socket(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 3
connect(3, {sa_family=AF_UNIX, sun_path="/var/run/nscd/socket"}, 110)
= -1 ENOENT (No such file or directory)
close(3) = 0
socket(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 3
connect(3, {sa_family=AF_UNIX, sun_path="/var/run/nscd/socket"}, 110)
= -1 ENOENT (No such file or directory)
close(3) = 0
openat(AT_FDCWD, "/etc/nsswitch.conf", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=312, ...}) = 0
read(3, "# Name Service Switch configurat"..., 4096) = 312
read(3, "", 4096) = 0
close(3) = 0
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=282302, ...}) = 0
mmap(NULL, 282302, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f8135308000
close(3) = 0
openat(AT_FDCWD, "/usr/lib/libnss_files.so.2", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P5\0\0\0\0\0\0"...,
832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=51376, ...}) = 0
mmap(NULL, 79320, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f8134ac7000
mmap(0x7f8134aca000, 28672, PROT_READ|PROT_EXEC,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f8134aca000
mmap(0x7f8134ad1000, 8192, PROT_READ,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xa000) = 0x7f8134ad1000
mmap(0x7f8134ad3000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xb000) = 0x7f8134ad3000
mmap(0x7f8134ad5000, 21976, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f8134ad5000
close(3) = 0
mprotect(0x7f8134ad3000, 4096, PROT_READ) = 0
munmap(0x7f8135308000, 282302) = 0
openat(AT_FDCWD, "/etc/passwd", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=1993, ...}) = 0
lseek(3, 0, SEEK_SET) = 0
read(3, "root:x:0:0:root:/root:/bin/zsh\nb"..., 4096) = 1993
close(3) = 0
geteuid() = 1000
uname({sysname="Linux", nodename="gtr", ...}) = 0
uname({sysname="Linux", nodename="gtr", ...}) = 0
readlinkat(AT_FDCWD, "/proc/self/exe",
"/home/patrick/src/ext/toybox/toy"..., 4095) = 35
rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
chdir("/home/patrick/src/ext/toybox") = 0
umask(027) = 027
getcwd("/home/patrick/src/ext/toybox", 4096) = 29
pipe([3, 4]) = 0
fcntl(10, F_GETFL) = -1 EBADF (Bad file descriptor)
dup2(1, 10) = 10
fcntl(10, F_SETFD, FD_CLOEXEC) = 0
dup2(4, 1) = 1
close(4) = 0
pipe([4, 5]) = 0
dup2(4, 254) = 254
close(4) = 0
fcntl(5, F_SETFD, FD_CLOEXEC) = 0
vfork() = 275889
close(254) = 0
fstat(5, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
lseek(5, 0, SEEK_CUR) = -1 ESPIPE (Illegal seek)
write(5, "declare - \"=\"\n", 14) = 14
fstat(5, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
lseek(5, 0, SEEK_CUR) = -1 ESPIPE (Illegal seek)
write(5, "declare - \"=\"\n", 14) = 14
fstat(5, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
lseek(5, 0, SEEK_CUR) = -1 ESPIPE (Illegal seek)
write(5, "declare - \"=\"\n", 14) = 14
fstat(5, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
lseek(5, 0, SEEK_CUR) = -1 ESPIPE (Illegal seek)
write(5, "declare - \"=\"\n", 14) = 14
fstat(5, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
lseek(5, 0, SEEK_CUR) = -1 ESPIPE (Illegal seek)
write(5, "declare - \"=1000\"\n", 18) = 18
fstat(5, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
lseek(5, 0, SEEK_CUR) = -1 ESPIPE (Illegal seek)
write(5, "declare - \"=1000\"\n", 18) = 18
fstat(5, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
lseek(5, 0, SEEK_CUR) = -1 ESPIPE (Illegal seek)
write(5, "declare - \"=275884\"\n", 20) = 20
fstat(5, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
lseek(5, 0, SEEK_CUR) = -1 ESPIPE (Illegal seek)
write(5, "declare - \"=gtr\"\n", 17) = 17
fstat(5, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
lseek(5, 0, SEEK_CUR) = -1 ESPIPE (Illegal seek)
write(5, "declare - \"=x86_64\"\n", 20) = 20
fstat(5, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
lseek(5, 0, SEEK_CUR) = -1 ESPIPE (Illegal seek)
write(5, "declare - \"=x86_64-unknown-linux"..., 34) = 34
fstat(5, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
lseek(5, 0, SEEK_CUR) = -1 ESPIPE (Illegal seek)
write(5, "declare - \"=Linux\"\n", 19) = 19
fstat(5, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
lseek(5, 0, SEEK_CUR) = -1 ESPIPE (Illegal seek)
write(5, "declare - \"=1\"\n", 15) = 15
fstat(5, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
lseek(5, 0, SEEK_CUR) = -1 ESPIPE (Illegal seek)
write(5, "declare - \"=/home/patrick/src/ex"..., 49) = 49
fstat(5, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
lseek(5, 0, SEEK_CUR) = -1 ESPIPE (Illegal seek)
write(5, "declare - \"=> \"\n", 16) = 16
fstat(5, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
lseek(5, 0, SEEK_CUR) = -1 ESPIPE (Illegal seek)
write(5, "declare - \"=#? \"\n", 17) = 17
fstat(5, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
lseek(5, 0, SEEK_CUR) = -1 ESPIPE (Illegal seek)
write(5, "./toybox\n", 9) = 9
close(5) = 0
dup2(10, 1) = 1
close(10) = 0
fstat(3, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
ioctl(3, BLKGETSIZE64, 0x7fff376bc240) = -1 ENOTTY (Inappropriate
ioctl for device)
lseek(3, 0, SEEK_CUR) = -1 ESPIPE (Illegal seek)
lseek(3, 0, SEEK_SET) = -1 ESPIPE (Illegal seek)
lseek(3, -1, SEEK_SET) = -1 ESPIPE (Illegal seek)
read(3, "", 4096) = 0
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=275889,
si_uid=1000, si_status=0, si_utime=0, si_stime=0} ---
close(3) = 0
exit_group(0) = ?
0 0 0
+++ exited with 0 +++
Patrick
More information about the Toybox
mailing list