next up previous
$B $B2]Bj(B $B>e$X(B: $B>pJs%7%9%F%` $BLa$k(B: $B%I%i%$%P$N3JG<(B

$B%"%W%j%1!<%7%g%s(B

$B%7%0%J%k$N%"%W%j%1!<%7%g%s$O!"%X%C%@%U%!%$%k$H$7$F(B<signal.h>$B$r(B $B%$%s%/%k!<%I$9$k!#(B

$B$^$?!"A0$K@bL@$7$?$h$&$K!"%"%W%j%1!<%7%g%sB&$GI,MW$H$J$k=hM}$O
\begin{boxedminipage}{\textwidth}
\begin{verbatim}...

$B%"%W%j%1!<%7%g%sB&$NHsF14|DL?.$N@_Dj$O(dio_tst.c)$B$K>e5-$N=hM}$rIU2C$9$l$P40N;$9$k$,!"(Bfgets$B4X?t$r(B $B;HMQ$7$?BT$A[Key]$B$,2!$5$l$k$N$rBT$DBe$j$K<+F0E*$KKh2s(B0.1$BICBT$A!"%+%&%s(B $B%H(B(count)$B$,(B10$B2s0J>e$K$J$C$?$iBT$D$3$H$r;_$a$k$h$&$K=q$-49$($k$3$H(B $B$K$9$k!#(B

\begin{boxedminipage}{\textwidth}
\begin{verbatim}// printf(''[Key] wo Ose! \n...
...sleep(1000 * 100);
if (count > 10)
break;
}\end{verbatim}
\end{boxedminipage}

$B%7%0%J%k%O%s%I%i(B(callback_proc)$B$K$O>e5-$N%+%&%s%H(B (count)$B$r%+%&%s%H%"%C%W$9$k=hM}$r=q$/!#EvA3$N$3$H$J$,$i(B count$B$O(Bmain$B$H(Bcallback_proc$B$N6&DL$NJQ?t$K$J$k$N$G(B $B%0%m!<%P%kJQ?t$K$7$F$*$/$3$H!#(Bmain$B$N(Bwhile(1)$B$GBT$Acallback_proc$B$,8F$P$l!"$=$N3d$j9~$_2s?t$,(B10 $B2s0J>e$K$J$C$?;~E@$G(Bwhile(1)$B%k!<%W$rH4$1$F=*N;$9$k$3$H$K$J$k!#(B

\begin{boxedminipage}{\textwidth}
\begin{verbatim}int count=0; //$B%0%m!<%P%kJQ(B..
...++;
printf(''callback_proc(%d)\n'', count);
}\end{verbatim}
\end{boxedminipage}

$B!<%O%;j&%c!&%-!&!


MANOME Yoichi $BJ?@.(B18$BG/(B12$B7n(B26$BF|(B