Newsgroups: fj.questions.unix
Path: galaxy.trc.rwcp.or.jp!coconuts.jaist!wnoc-tyo-news!news.nc.u-tokyo.ac.jp!train.ad.jp!ochanews.ocha.ac.jp!is.ocha.ac.jp!ichikawa
From: ichikawa@is.ocha.ac.jp (Yoshihiko ICHIKAWA)
Subject: [Q] Gnu readline signal handler
Message-ID: <1997Feb28.141013.3113@is.ocha.ac.jp>
Sender: usenet@is.ocha.ac.jp (News Administrator)
Nntp-Posting-Host: white.is.ocha.ac.jp
Organization: Dept. of Information Sciences, Faculty of Science, Ochanomizu University, JAPAN
X-Newsreader: mnews [version 1.18PL3] 1994-08/01(Mon)
Date: Fri, 28 Feb 1997 14:10:13 GMT
Lines: 42
Xref: galaxy.trc.rwcp.or.jp fj.questions.unix:6744
X-originally-archived-at: http://galaxy.rwcp.or.jp/text/cgi-bin/newsarticle2?ng=fj.questions.unix&nb=6744&hd=a
X-reformat-date: Mon, 18 Oct 2004 15:18:22 +0900
X-reformat-comment: Tabs were expanded into 4 column tabstops by the Galaxy's archiver. See http://katsu.watanabe.name/ancientfj/galaxy-format.html for more info.


$B;T@n!w$*CcBg(B $B$H?=$7$^$9!#(B

$B8=:_!"(Bgdb-4.16 $B$HF1;~$K(B distribute $B$5$l$F$$$k(B GNU readline library
$B$r(B Solaris2.4 $B$N>e$G;H$C$F$$$k$N$G$9$,!"$I$&$b3d$j9~$_$N=hM}$,4|BT(B
$B$7$?DL$j$KF0$-$^$;$s!#2?$+$7$i$4B8CN$NJ}$$$i$C$7$c$$$^$7$?$i8f65<((B
$B4j$$$^$9!#(B

$BNc$H$7$F!"(Bexamples/fileman.c $B$r<h$j>e$2$F$_$^$9!#%G%U%)%k%H$G$O(B
signal handler $B$OFC$K;XDj$5$l$F$$$J$$$N$G!"(B

% fileman
Fileman: ^C
%

$B$H$J$C$F=*N;$7$^$9!#$d$j$?$$$N$O!"$3$N(B read-eval-print loop $B$N(B
$BESCf$G(B SIGINT $B$N(B handling $B$r$5$;$?$$$N$G$9$,!"%3%^%s%IF~NO(B
$B$NESCf$G0lEY!"(BSIGINT $B$rH/@8$5$;$k$H!"0J9_(B Ctr-C $B$O$b$A$m$s!"(B
$B%W%m%;%9<+BN$,(B SIGINT $B$r$&$1$D$1$J$/$J$C$F$7$^$$$^$9!#(B

% fileman_with_int_handler
Fileman: ^C
... messages ....
Fileman:      <--- $B0J9_$O(B Ctr-C $B$O$b$A$m$s(B kill -2 $B$b8z$+$:!#(B

Ctr-Z $B$J$I$O8z$-$^$9$7!"FbIt$G@_Dj$5$l$F$$$k(B signal
handler $B$N4X?tHVCO$r=PNO$5$;$k$H0U?^$7$?CM$,F~$C$F$$$^$9$N$G!"(B
$B$I$&$b%,%F%s$,9T$+$J$$$N$G$9!#(B

prep.ai.mit.edu $B$G3NG'$7$F$_$?8B$j$G$O!"(Bgdb-4.16 $B$,:G?7$N$h$&(B
$B$G$9$7(B $BFHN)$K(B distribute $B$5$l$F$$$k(B readline-2.0 $B$O$:$$$V$s$H(B
$B8E$$$b$N$h$&$G>/!9:$$C$F$*$j$^$9!#(B

# editline $B$b;n$7$?$N$G$9$,!"D9$$9T$NJT=8$KFq$,$"$k$h$&$G$9$N$G!"(B
# $B$G$-$l$P!"(BGNU readline $B$G$d$j$?$$$H9M$($F$$$^$9!#(B

$B59$7$/$*4j$$$7$^$9!#(B

Yoshihiko Ichikawa, Dept of Info Sci, Fac of Sci, Ochanomizu University
Phone:  +81-3-5978-5708 (Dial-in) / +81-3-5978-5704 (Library of Department)
Fax:    +81-3-5978-5898 (Faculty) / +81-3-5878-5705 (Library of Department)
E-mail: ichikawa@is.ocha.ac.jp
