[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[FDclone-users:00992] パイプ先を間違えることができない?



小松です。

パイプ処理は頻繁にやることですが、パイプ先の名前を間違うと数回に
一度の割合で固まります。たとえばlessのつもりでlesと打ってしまう
とか:


hironao@cynthia:~/FD-3.00l% ./fdsh
hironao@cynthia:FD-3.00l$ ls -l | les
les: command not found
hironao@cynthia:FD-3.00l$ ls -l | les
les: command not found
hironao@cynthia:FD-3.00l$ ls -l | les
les: command not found
hironao@cynthia:FD-3.00l$ ls -l | les
les: command not found

無限ループに入ったプロセスにシグナルを食わせてcoreを吐かせます。

zsh: abort (core dumped)  ./fdsh


Core was generated by `./fdsh'.
Program terminated with signal 6, Aborted.
#0  0xffffe424 in __kernel_vsyscall ()
(gdb) bt
#0  0xffffe424 in __kernel_vsyscall ()
#1  0xb761987b in sigprocmask () from /lib/libc.so.6
#2  0x08058761 in resetsignal (forced=<optimized out>) at system.c:1728
#3  0x0805bbe2 in prepareexit (noexit=0) at system.c:2195
#4  0x0804a641 in signalexit (sig=7) at main.c:340
#5  0x0804a70e in buserror () at main.c:487
#6  <signal handler called>
#7  0xffffe424 in __kernel_vsyscall ()
#8  0xb761987b in sigprocmask () from /lib/libc.so.6
#9  0x08064185 in trap_common (sig=22) at system.c:1800
#10 0x080644ca in trap_ttou () at system.c:2081
#11 <signal handler called>
#12 0xffffe424 in __kernel_vsyscall ()
#13 0xb76b1769 in ioctl () from /lib/libc.so.6
#14 0xb76b0f45 in tcflush () from /lib/libc.so.6
#15 0x0804d5c7 in Xtcflush (fd=1023, selector=0) at termio.c:497
#16 0x0804defa in keyflush () at term.c:1052
#17 0x0804a626 in signalexit (sig=6) at main.c:335
#18 0x0804a73c in ioerror () at main.c:460
#19 <signal handler called>
#20 0xffffe424 in __kernel_vsyscall ()
#21 0xb76b0cc0 in tcsetattr () from /lib/libc.so.6
#22 0x0804d579 in Xtcsetattr (fd=1023, action=2, t=0xbfbd87c4) at termio.c:477 #23 0x0804f8ba in ttymode (set=0, reset=<optimized out>, iset=1, ireset=1282, oset=6149,
     oreset=0, vmin=1, vtime=0) at term.c:958
#24 0x0804ff10 in ttyiomode (isnl=1) at term.c:1098
#25 0x08083a4b in Xttyiomode (isnl=1) at frontend.c:113
#26 0x0804b449 in checkscreen (xmax=-1, ymax=-1) at main.c:622
#27 0x08062e24 in waitchild (pid=2785, trp=0x0) at system.c:2775
#28 0x0805bd1c in closepipe (fd=<optimized out>) at system.c:6546
#29 0x0805b903 in exec_stree (trp=0x8fb31e0, cond=<optimized out>) at system.c:10339
#30 0x0805b585 in exec_stree (trp=0x8fb4070, cond=0) at system.c:10260
#31 0x08061625 in execline (command=<optimized out>, stree=0x8fb4070, trp=0x8fb43b0,
     noexit=0) at system.c:10380
#32 0x0805c034 in exec_line (command=0x8fb5838 "ls -l | les") at system.c:10417
#33 0x080665c8 in shell_loop (pseudoexit=0) at system.c:11198
#34 0x0806676d in main_shell (argc=1, argv=0xbfbd8be4, envp=0xbfbd8bec) at system.c:11244 #35 0x0804bb85 in main (argc=1, argv=0xbfbd8be4, envp=0xbfbd8bec) at main.c:1529

…スタックトレースの上半分は意味ない気が。


--
Hironao Komatsu <hirkmt@gmail.com>