Created
February 1, 2014 18:28
-
-
Save sjachim/8756391 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# strace -s 200 -f /usr/bin/kcard_app.sh start | |
execve("/usr/bin/kcard_app.sh", ["/usr/bin/kcard_app.sh", "start"], [/* 6 vars */]) = 0 | |
ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0 | |
ioctl(1, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0 | |
getpid() = 250 | |
getuid32() = 0 | |
brk(0) = 0x1d8000 | |
brk(0x1d9000) = 0x1d9000 | |
getpid() = 250 | |
rt_sigaction(SIGCHLD, {SIG_DFL, [CHLD], SA_RESTART|0x4000000}, {SIG_DFL, [], 0}, 8) = 0 | |
rt_sigaction(SIGHUP, {SIG_DFL, [HUP], SA_RESTART|0x4000000}, {SIG_DFL, [], 0}, 8) = 0 | |
geteuid32() = 0 | |
getppid() = 249 | |
stat64("/", {st_mode=S_IFDIR|0775, st_size=0, ...}) = 0 | |
stat64(".", {st_mode=S_IFDIR|0775, st_size=0, ...}) = 0 | |
open("/usr/bin/kcard_app.sh", O_RDONLY|O_LARGEFILE) = 3 | |
fcntl64(3, F_DUPFD, 10) = 10 | |
close(3) = 0 | |
fcntl64(10, F_SETFD, FD_CLOEXEC) = 0 | |
rt_sigaction(SIGINT, NULL, {SIG_DFL, [], 0}, 8) = 0 | |
rt_sigaction(SIGINT, {0xefcd4, ~[], 0x4000000 /* SA_??? */}, NULL, 8) = 0 | |
rt_sigaction(SIGQUIT, NULL, {SIG_DFL, [], 0}, 8) = 0 | |
rt_sigaction(SIGQUIT, {SIG_IGN, [], 0x4000000 /* SA_??? */}, NULL, 8) = 0 | |
rt_sigaction(SIGTERM, NULL, {SIG_DFL, [], 0}, 8) = 0 | |
rt_sigaction(SIGTERM, {SIG_DFL, [], 0x4000000 /* SA_??? */}, NULL, 8) = 0 | |
read(10, "#!/bin/sh\n\n\nstart() {\n\techo \"$0: start\"\n\n\tkcard_app -e /tmp/log.kcard --nohidden &\n}\nstop() {\n\techo \"$0: stop\"\n\tpkill kcard_app\n}\nusage() {\n\techo \"$0: usage\"\n}\ncase $1 in\n\t\"start\")\n\t\tstart\n\t\t;;\n\n\t\"sto"..., 1023) = 239 | |
wait4(-1, 0xbe902684, WNOHANG, NULL) = -1 ECHILD (No child processes) | |
wait4(-1, 0xbe9020a4, WNOHANG, NULL) = -1 ECHILD (No child processes) | |
fcntl64(1, F_GETFL) = 0x20002 (flags O_RDWR|O_LARGEFILE) | |
write(1, "/usr/bin/kcard_app.sh: start\n", 29/usr/bin/kcard_app.sh: start | |
) = 29 | |
fork(Process 251 attached (waiting for parent) | |
Process 251 resumed (parent 250 ready) | |
) = 251 | |
[pid 251] close(10) = 0 | |
[pid 251] rt_sigaction(SIGINT, {SIG_IGN, [INT], SA_RESTART|0x4000000}, {0xefcd4, ~[KILL STOP], 0x4000000 /* SA_??? */}, 8) = 0 | |
[pid 251] close(0) = 0 | |
[pid 251] open("/dev/null", O_RDONLY|O_LARGEFILE) = 0 | |
[pid 251] stat64("/sbin/kcard_app", <unfinished ...> | |
[pid 250] read(10, "", 1023) = 0 | |
[pid 250] exit(0) = ? | |
[pid 251] <... stat64 resumed> 0xbe901db8) = -1 ENOENT (No such file or directory) | |
stat64("/usr/sbin/kcard_app", 0xbe901db8) = -1 ENOENT (No such file or directory) | |
stat64("/bin/kcard_app", 0xbe901db8) = -1 ENOENT (No such file or directory) | |
stat64("/usr/bin/kcard_app", {st_mode=S_IFREG|0755, st_size=1500548, ...}) = 0 | |
brk(0x1da000) = 0x1da000 | |
execve("/usr/bin/kcard_app", ["kcard_app", "-e", "/tmp/log.kcard", "--nohidden"], [/* 6 vars */]) = 0 | |
ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, 0xbe8ecd7c) = -1 ENOTTY (Inappropriate ioctl for device) | |
ioctl(1, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0 | |
getpid() = 251 | |
getuid32() = 0 | |
getpid() = 251 | |
rt_sigaction(SIGUSR1, {0x10e2dc, [USR1], SA_RESTART|0x4000000}, {SIG_DFL, [], 0}, 8) = 0 | |
brk(0) = 0x1d8000 | |
brk(0x1d9000) = 0x1d9000 | |
open("/var/run/kcard_app.pid", O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE, 0666) = 3 | |
ioctl(3, SNDCTL_TMR_TIMEBASE or TCGETS, 0xbe8ecc3c) = -1 ENOTTY (Inappropriate ioctl for device) | |
brk(0x1da000) = 0x1da000 | |
fsync(1933320) = -1 EBADF (Bad file descriptor) | |
write(3, "251", 3) = 3 | |
close(3) = 0 | |
write(1, "KCARD: Notify driver about pid 251\n", 35KCARD: Notify driver about pid 251 | |
) = 35 | |
open("/dev/ka-main", O_RDWR|O_LARGEFILE) = 3 | |
ioctl(3, 0x16, 0xbe8ecd94) = 0 | |
close(3) = 0 | |
write(1, "KCARD: Log = 0, Diff Disable, Path /tmp/filediff\n", 49KCARD: Log = 0, Diff Disable, Path /tmp/filediff | |
) = 49 | |
write(1, "KCARD: Debounce = 1, WiFi Hide Disable, Skip Disable\n", 53KCARD: Debounce = 1, WiFi Hide Disable, Skip Disable | |
) = 53 | |
open("/tmp/log.kcard", O_RDWR|O_CREAT|O_APPEND|O_LARGEFILE, 0666) = 3 | |
ioctl(3, SNDCTL_TMR_TIMEBASE or TCGETS, 0xbe8ecc3c) = -1 ENOTTY (Inappropriate ioctl for device) | |
write(3, "Log = 0, Diff Disable, Path /tmp/filediff\n", 42) = 42 | |
close(3) = 0 | |
open("/tmp/log.kcard", O_RDWR|O_CREAT|O_APPEND|O_LARGEFILE, 0666) = 3 | |
ioctl(3, SNDCTL_TMR_TIMEBASE or TCGETS, 0xbe8ecc3c) = -1 ENOTTY (Inappropriate ioctl for device) | |
write(3, "Debounce = 1, WiFi Hide Disable, Skip Disable\n", 46) = 46 | |
close(3) = 0 | |
pipe([3, 4]) = 0 | |
fork(Process 252 attached | |
) = 252 | |
[pid 252] socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 5 | |
[pid 252] setsockopt(5, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0 | |
[pid 252] bind(5, {sa_family=AF_INET, sin_port=htons(5566), sin_addr=inet_addr("0.0.0.0")}, 16) = -1 EADDRINUSE (Address already in use) | |
[pid 252] ioctl(2147483647, SNDCTL_TMR_TIMEBASE or TCGETS, 0xbe8dcab4) = -1 EBADF (Bad file descriptor) | |
[pid 252] brk(0x1db000) = 0x1db000 | |
[pid 252] write(2, "kcard_app: bind: Address already in use\n", 40kcard_app: bind: Address already in use | |
) = 40 | |
[pid 252] exit(1) = ? | |
Process 252 detached | |
open("/var/run/kcard_app_sub.pid", O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE, 0666) = 5 | |
--- SIGCHLD (Child exited) @ 0 (0) --- | |
ioctl(5, SNDCTL_TMR_TIMEBASE or TCGETS, 0xbe8ecc3c) = -1 ENOTTY (Inappropriate ioctl for device) | |
fsync(1933320) = -1 EBADF (Bad file descriptor) | |
write(5, "252", 3) = 3 | |
close(5) = 0 | |
close(3) = 0 | |
socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 3 | |
connect(3, {sa_family=AF_INET, sin_port=htons(55778), sin_addr=inet_addr("127.0.0.1")}, 16) = 0 | |
open("/tmp/wsd.conf", O_RDONLY|O_LARGEFILE) = 5 | |
ioctl(5, SNDCTL_TMR_TIMEBASE or TCGETS, 0xbe8eca24) = -1 ENOTTY (Inappropriate ioctl for device) | |
_llseek(5, 0, [0], SEEK_SET) = 0 | |
read(5, "Config-State : 0\nLogin-enable : \nLogin-name : admin\nLogin-password : admin\nLogin-set : No\nLogin-user : \n[LANGUAGE]\nEnglish\n[AP]\nAP_ACCOUNT : 1\nSSID : \nKey : \n[FTP]\nFTP Path : \nUser Name : \nPassword : "..., 4096) = 625 | |
_llseek(5, 0, [625], SEEK_CUR) = 0 | |
close(3) = 0 | |
open("/tmp/flist", O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE, 0666) = 3 | |
ioctl(3, SNDCTL_TMR_TIMEBASE or TCGETS, 0xbe8ecc34) = -1 ENOTTY (Inappropriate ioctl for device) | |
brk(0x1db000) = 0x1db000 | |
open("/mnt/sd/DCIM", O_RDONLY|O_NONBLOCK|O_DIRECTORY) = 6 | |
fstat(6, {st_mode=S_IFDIR|0755, st_size=32768, ...}) = 0 | |
fcntl(6, F_SETFD, FD_CLOEXEC) = 0 | |
mmap2(NULL, 36864, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, 0, 0) = 0x40000000 | |
getdents64(6, /* 2 entries */, 32768) = 48 | |
getdents64(6, /* 0 entries */, 32768) = 0 | |
munmap(0x40000000, 36864) = 0 | |
close(6) = 0 | |
close(3) = 0 | |
rt_sigaction(SIGALRM, {0x10d8d8, [ALRM], SA_RESTART|0x4000000}, {SIG_DFL, [], 0}, 8) = 0 | |
rt_sigaction(SIGUSR2, {0x10d804, [USR2], SA_RESTART|0x4000000}, {SIG_DFL, [], 0}, 8) = 0 | |
write(1, "KCARD: waitting for sig\n", 24KCARD: waitting for sig | |
) = 24 | |
pause() = ? ERESTARTNOHAND (To be restarted) | |
--- SIGUSR1 (User defined signal 1) @ 0 (0) --- | |
rt_sigaction(SIGUSR1, {0x10d5ac, [USR1], SA_RESTART|0x4000000}, {0x10e2dc, [USR1], SA_RESTART|0x4000000}, 8) = 0 | |
open("/dev/ka-main", O_RDWR|O_LARGEFILE) = 3 | |
ioctl(3, 0x17, 0xbe8ec9fe) = 0 | |
close(3) = 0 | |
write(1, "KCARD: get_Kcard_app cmd 8 - KCARD: KCARD_SIG_NO_IMGS\n", 54KCARD: get_Kcard_app cmd 8 - KCARD: KCARD_SIG_NO_IMGS | |
) = 54 | |
open("/tmp/log.kcard", O_RDWR|O_CREAT|O_APPEND|O_LARGEFILE, 0666) = 3 | |
ioctl(3, SNDCTL_TMR_TIMEBASE or TCGETS, 0xbe8ec8fc) = -1 ENOTTY (Inappropriate ioctl for device) | |
write(3, "KCARD_SIG_NO_IMGS\n", 18) = 18 | |
close(3) = 0 | |
write(1, "KCARD: kcard_app_act - KCARD: KCARD_SIG_NO_IMGS\n", 48KCARD: kcard_app_act - KCARD: KCARD_SIG_NO_IMGS | |
) = 48 | |
open("/dev/ka-main", O_RDWR|O_LARGEFILE) = 3 | |
ioctl(3, 0x10, 0) = 0 | |
close(3) = 0 | |
open("/dev/ka-main", O_RDWR|O_LARGEFILE) = 3 | |
ioctl(3, 0x11, 0) = 0 | |
close(3) = 0 | |
open("/dev/ka-main", O_RDWR|O_LARGEFILE) = 3 | |
ioctl(3, 0x13, 0) = 0 | |
close(3) = 0 | |
rt_sigaction(SIGUSR1, {0x10e2dc, [USR1], SA_RESTART|0x4000000}, {0x10d5ac, [USR1], SA_RESTART|0x4000000}, 8) = 0 | |
sigreturn() = ? (mask now [HUP INT ILL ABRT FPE KILL USR1 SEGV PIPE ALRM STKFLT CONT STOP TTIN]) | |
write(1, "KCARD: waitting for sig\n", 24KCARD: waitting for sig | |
) = 24 | |
pause() = ? ERESTARTNOHAND (To be restarted) | |
--- SIGUSR1 (User defined signal 1) @ 0 (0) --- | |
rt_sigaction(SIGUSR1, {0x10d5ac, [USR1], SA_RESTART|0x4000000}, {0x10e2dc, [USR1], SA_RESTART|0x4000000}, 8) = 0 | |
open("/dev/ka-main", O_RDWR|O_LARGEFILE) = 3 | |
ioctl(3, 0x17, 0xbe8ec9fe) = 0 | |
close(3) = 0 | |
write(1, "KCARD: get_Kcard_app cmd 7 - KCARD: KCARD_SIG_UPDATED\n", 54KCARD: get_Kcard_app cmd 7 - KCARD: KCARD_SIG_UPDATED | |
) = 54 | |
open("/tmp/log.kcard", O_RDWR|O_CREAT|O_APPEND|O_LARGEFILE, 0666) = 3 | |
ioctl(3, SNDCTL_TMR_TIMEBASE or TCGETS, 0xbe8ec8fc) = -1 ENOTTY (Inappropriate ioctl for device) | |
write(3, "KCARD_SIG_UPDATED\n", 18) = 18 | |
close(3) = 0 | |
setitimer(ITIMER_REAL, {it_interval={0, 0}, it_value={1, 0}}, {it_interval={0, 0}, it_value={0, 0}}) = 0 | |
write(1, "KCARD: kcard_app_act - KCARD: KCARD_SIG_UPDATED\n", 48KCARD: kcard_app_act - KCARD: KCARD_SIG_UPDATED | |
) = 48 | |
open("/dev/ka-main", O_RDWR|O_LARGEFILE) = 3 | |
ioctl(3, 0x10, 0) = 0 | |
close(3) = 0 | |
open("/dev/ka-main", O_RDWR|O_LARGEFILE) = 3 | |
ioctl(3, 0x11, 0) = 0 | |
close(3) = 0 | |
rt_sigaction(SIGUSR1, {0x10e2dc, [USR1], SA_RESTART|0x4000000}, {0x10d5ac, [USR1], SA_RESTART|0x4000000}, 8) = 0 | |
sigreturn() = ? (mask now [HUP INT ILL ABRT FPE KILL USR1 SEGV PIPE ALRM STKFLT CONT STOP TTIN]) | |
write(1, "KCARD: waitting for sig\n", 24KCARD: waitting for sig | |
) = 24 | |
pause() = ? ERESTARTNOHAND (To be restarted) | |
--- SIGALRM (Alarm clock) @ 0 (0) --- | |
write(4, "Update list", 11) = -1 EPIPE (Broken pipe) | |
--- SIGPIPE (Broken pipe) @ 0 (0) --- | |
Process 251 detached | |
# strace -f -s 200 -o /tmp/strace1 /usr/bin/kcard_startup -s 0 | |
kcard_startup: Set call interval 10 | |
# | |
# cat /tmp/strace1 | |
369 execve("/usr/bin/kcard_startup", ["/usr/bin/kcard_startup", "-s", "0"], [/* 6 vars */]) = 0 | |
369 ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0 | |
369 ioctl(1, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0 | |
369 getpid() = 369 | |
369 getuid32() = 0 | |
369 write(1, "kcard_startup: Set call interval 10\n", 36) = 36 | |
369 open("/dev/ka-main", O_RDWR|O_LARGEFILE) = 3 | |
369 ioctl(3, 0xa, 0xa) = -1 EFAULT (Bad address) | |
369 close(3) = 0 | |
369 open("/dev/ka-main", O_RDWR|O_LARGEFILE) = 3 | |
369 ioctl(3, 0x11, 0) = 0 | |
369 close(3) = 0 | |
369 exit(0) = ? | |
# cat /proc/devices | |
Character devices: | |
1 mem | |
4 ttyS | |
5 /dev/tty | |
5 /dev/console | |
5 /dev/ptmx | |
10 misc | |
125 ka-pwm | |
128 ptm | |
136 pts | |
232 ka-sdsw | |
Block devices: | |
259 blkext | |
7 loop | |
179 mmc | |
# ls -la /dev/ka-* | |
crwxrwxrwx 1 0 0 232, 0 Jan 3 2012 /dev/ka-main | |
crwxrwxrwx 1 0 0 125, 0 Jan 3 2012 /dev/ka-pwm | |
crwxrwxrwx 1 0 0 125, 1 Jan 3 2012 /dev/ka-pwm1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment