From owner-FreeBSD-users-jp@jp.freebsd.org  Tue Nov  5 18:18:03 1996
Received: by jaz.jp.freebsd.org (8.7.3+2.6Wbeta5/8.7.3) id SAA16734
	Tue, 5 Nov 1996 18:18:03 +0900 (JST)
Received: by jaz.jp.freebsd.org (8.7.3+2.6Wbeta5/8.7.3) with ESMTP id SAA16729
	for <freebsd-users-jp@jp.freebsd.org>; Tue, 5 Nov 1996 18:18:00 +0900 (JST)
Received: from totoro.tdc.tijp.ti.com ([134.183.198.39]) by gatekeep.ti.com (8.6.13) with ESMTP id DAA19207 for <freebsd-users-jp@jp.freebsd.org>; Tue, 5 Nov 1996 03:16:51 -0600
Received: from i.tdc.tijp.ti.com (i.tdc.tijp.ti.com [134.183.198.42]) by totoro.tdc.tijp.ti.com (8.7.1/8.6.9) with ESMTP id SAA26286 for <freebsd-users-jp@jp.freebsd.org>; Tue, 5 Nov 1996 18:16:20 +0900 (JST)
Received: from i (localhost [127.0.0.1]) by i.tdc.tijp.ti.com (8.7.1/3.3W6) with ESMTP id SAA16459 for <freebsd-users-jp@jp.freebsd.org>; Tue, 5 Nov 1996 18:16:22 +0900 (JST)
Message-Id: <199611050916.SAA16459@i.tdc.tijp.ti.com>
To: freebsd-users-jp@jp.freebsd.org
Mime-Version: 1.0 (generated by tm-edit 7.75)
Content-Type: text/plain; charset=ISO-2022-JP
Date: Tue, 05 Nov 1996 18:16:22 +0900
From: uchikawa <uchikawa@i.tdc.tijp.ti.com>
Reply-To: FreeBSD-users-jp@jp.freebsd.org
X-Distribute: distribute [version 2.1 (Alpha) patchlevel=19]
X-Sequence: FreeBSD-users-jp 5935
Subject: [FreeBSD-users-jp 5935] Re: Okiraku (Re:GOOD BOOKS)
Errors-To: owner-FreeBSD-users-jp@jp.freebsd.org
Sender: owner-FreeBSD-users-jp@jp.freebsd.org

$BFb@n$G$9(B

>>>>>	 $B;3K\(B  $BLP(B  <shigeru@iij.ad.jp> wrote:
  > $B$=$l$+$i!"$J$s$G:#$G$b8E$$%f!<%6$O(Bsync$B$r(B2$B2sBG$D$N$+$H8@$&$H!"<!$N$h$&(B
  > $B$JM}M3$@$H;W$o$l$^$9!#(B
  > $B@N$O(Bshutdown$B$H8@$&%3%^%s%I$O$J$/!"%7%9%F%`$NDd;_$K$O(Bhalt$B$H;H$C$F$$$^$7(B
  > $B$?!#(B
  > halt$B$O%7%9%F%`$NDd;_$r9T$J$&$@$1$G!"%U%!%$%k%7%9%F%`$NF14|$O9T$J$$$^$;(B
  > $B$s!#(B

$B$3$3$G;d$N@h$N%a!<%k(B [FreeBSD-users-jp 5810]$B$K5"$C$F$/$k$o$1$G$9$,(B
FreeBSD$B$N(B 2.1.5R $B$N(Breboot/halt ($BF1$8$b$N(B)$B$N%=!<%9$G$O0J2<$N$h$&$K$J$C(B
$B$F$$$^$9!#(B

        if (!nflag)
                sync();

        /* Just stop init -- if we fail, we'll restart it. */
        if (kill(1, SIGTSTP) == -1)
                err("SIGTSTP init: %s", strerror(errno));

        /* Ignore the SIGHUP we get when our parent shell dies. */
        (void)signal(SIGHUP, SIG_IGN);

        /* Send a SIGTERM first, a chance to save the buffers. */
        if (kill(-1, SIGTERM) == -1)
                err("SIGTERM processes: %s", strerror(errno));

        /*
         * After the processes receive the signal, start the rest of the
         * buffers on their way.  Wait 5 seconds between the SIGTERM and
         * the SIGKILL to give everybody a chance.
         */
        sleep(2);
        if (!nflag)
                sync();
        sleep(3);

$B%G%U%)%k%H$G$O!"$^$:(B sync $B$r9T$J$C$F$+$i(B init $B$r;_$a$F(B SIGTERM$B$GA4%W%m(B
$B%;%9$rDd;_$5$;!"(B2$BICBT$C$F$U$?$?$S(B sync$B!"99$K(B3$BICBT$C$F;_$^$C$F$$$J$$%W(B
$B%m%;%9$K$D$$$F$O(B SIGKILL $B$H$$$&<j=g$K$J$C$F$$$^$9!#(B

$B>/$J$/$H$b(B FreeBSD$B$G$O!V(Bsync 2$B2s!W$H$$$&$N$O$[$H$s$I0UL#$,$J$/$J$C$F$$(B
$B$k$H8@$($k$N$G$O$J$$$G$7$g$&$+!#(B
----
  yoshiaki@kt.rim.or.jp
