3 ms·
Ok, here is strace of date(1), which is dynamically linked, on Alpine Linux which uses Musl libc not glibc. execve("/bin/date", ["date"], [/* 16 vars */]) = 0
by justincormack 12y ago
Ok, here is strace of date(1), which is dynamically linked, on Alpine Linux which uses Musl libc not glibc.
execve("/bin/date", ["date"], [/* 16 vars */]) = 0
mprotect(0x7777dcd5a000, 4096, PROT_READ) = 0
mprotect(0xdc2d89a3000, 4096, PROT_READ) = 0
arch_prctl(ARCH_SET_FS, 0xdc2d89a4268) = 0
set_tid_address(0xdc2d89a4298) = 2439
clock_gettime(CLOCK_REALTIME, {1424769563, 611556639}) = 0
open("/etc/localtime", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=118, ...}) = 0
mmap(NULL, 118, PROT_READ, MAP_SHARED, 3, 0) = 0x7777dcd57000
close(3) = 0
ioctl(1, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, {B38400 opost isig icanon echo ...}) = 0
writev(1, [{"Tue Feb 24 09:19:23 UTC 2015", 28}, {"\n", 1}], 2Tue Feb 24 09:19:23 UTC 2015
) = 29
close(1) = 0
close(2) = 0
exit_group(0) = ?
+++ exited with 0 +++
- SixSigma 12y agoThat is worlds apart.
- SixSigma 12y agoOpenBSD's ktrace is similar 31144 date CALL readlink(0x3c001c16,0xcfbe7048,0x3f) 31144 date NAMI "/etc/malloc.conf" 31144 date RET readlink -1 errno 2 No such file or directory 31144 date CALL open(0x3c001967,0<O_RDONLY>) 31144 date NAMI "/etc/localtime" 31144 date RET open 3 31144 date CALL open(0xcfbde9d4,0<O_RDONLY>) 31144 date NAMI "/usr/share/zoneinfo/posixrules 31144 date RET open 3
- justincormack 12y agoYes, in many ways Musl is a BSD style libc for Linux (even down to the license). Add pkgsrc and it is pretty BSD-like.