From owner-doc-jp@jp.freebsd.org  Tue May  8 02:55:56 2001
Received: (from daemon@localhost)
	by castle.jp.freebsd.org (8.9.3+3.2W/8.7.3) id CAA29101;
	Tue, 8 May 2001 02:55:56 +0900 (JST)
	(envelope-from owner-doc-jp@jp.FreeBSD.org)
Received: from catv00.kitanet.ne.jp (catv00.kitanet.ne.jp [210.146.3.11])
	by castle.jp.freebsd.org (8.9.3+3.2W/8.7.3) with SMTP id CAA29096
	for <doc-jp@jp.FreeBSD.org>; Tue, 8 May 2001 02:55:54 +0900 (JST)
	(envelope-from ytabata@kitanet.ne.jp)
Received: (qmail 8733 invoked by uid 0); 7 May 2001 17:55:54 -0000
Received: from ngw.kitanet.ne.jp (HELO localhost) (210.146.3.7)
  by catv00.kitanet.ne.jp with SMTP; 7 May 2001 17:55:54 -0000
To: doc-jp@jp.FreeBSD.org
In-Reply-To: <20010506001424I.ytabata@kitanet.ne.jp>
References: <20010505.041103.104025248.hrs@eos.ocn.ne.jp>
	<20010506001424I.ytabata@kitanet.ne.jp>
X-Mailer: Mew version 1.94.2 on XEmacs 21.1 (Cuyahoga Valley)
Mime-Version: 1.0
Content-Type: Multipart/Mixed;
 boundary="--Next_Part(Tue_May__8_02:56:51_2001_559)--"
Content-Transfer-Encoding: 7bit
Message-Id: <20010508025734L.ytabata@kitanet.ne.jp>
Date: Tue, 08 May 2001 02:57:34 +0900
From: Yoshiaki TABATA <ytabata@kitanet.ne.jp>
X-Dispatcher: imput version 20000228(IM140)
Lines: 438
Reply-To: doc-jp@jp.freebsd.org
Precedence: list
X-Distribute: distribute version 2.1 (Alpha) patchlevel 24e+010328
X-Sequence: doc-jp 8195
Subject: [doc-jp 8195] Re: Call for Translators
Errors-To: owner-doc-jp@jp.freebsd.org
Sender: owner-doc-jp@jp.freebsd.org
X-Originator: ytabata@kitanet.ne.jp

----Next_Part(Tue_May__8_02:56:51_2001_559)--
Content-Type: Text/Plain; charset=iso-2022-jp
Content-Transfer-Encoding: 7bit

$BEDH*$G$9!#(B

> 
> book.4.sgml(Process Management)$B$NM=Ls$r$*4j$$$7$^$9(B.
> 

$B$H$j$"$($:Ap9F$"$,$j$^$7$?!#::FI$*4j$$$7$^$9!#(B 

$BB>$N2U=j$KFCJL<+?.$,$"$k$o$1$G$O$"$j$^$;$s$,!"(B
$B%7%0%J%k$N@a$NM%@hEY$K4X$9$k(B
	  Signal handlers execute with the signal that caused their
	  invocation to be blocked, but other signals may yet occur.
$B$H$$$&$/$@$j$NLu$,FC$K<+?.$"$j$^$;$s!#(B($B$H$$$&$+:G0-$G$9(B;)
$B$$$$Lu$7J}$,$"$j$^$7$?$i$465<x$/$@$5$$!#(B

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

----Next_Part(Tue_May__8_02:56:51_2001_559)--
Content-Type: Text/Plain; charset=iso-2022-jp
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="book.4j.sgml"

    <sect1>
      <title>Process Management</title>
      <title>$B%W%m%;%94IM}(B</title>

      <para>4.4BSD supports a multitasking environment.
	Each task or thread of execution is termed a
	<emphasis>process</emphasis>.
	The
	<emphasis>context</emphasis>
	of a 4.4BSD process consists of user-level state,
	including the contents of its address space
	and the run-time environment, and kernel-level state,
	which includes
	scheduling parameters,
	resource controls,
	and identification information.
	The context includes everything
	used by the kernel in providing services for the process.
	Users can create processes, control the processes' execution,
	and receive notification when the processes' execution status changes.
	Every process is assigned a unique value, termed a
	<emphasis>process identifier</emphasis>
	(PID).
	This value is used by the kernel to identify a process when reporting
	status changes to a user, and by a user when referencing a process
	in a system call.</para>
	  <para>4.4BSD$B$O%^%k%A%?%9%/4D6-$r%5%]!<%H$7$F$$$^$9!#(B
	$B<B9T$5$l$?$=$l$>$l$N%?%9%/$^$?$O%9%l%C%I$O(B
	<emphasis>$B%W%m%;%9(B</emphasis>$B$H$h$P$l$F$$$^$9(B.
	4.4BSD$B$N%W%m%;%9$N(B<emphasis>$B%3%s%F%-%9%H(B</emphasis>$B$O(B
	$B%"%I%l%96u4V$NFbMF$H<B9T4D6-$r4^$`%f!<%6%l%Y%k$N>uBV$H(B
	$B%9%1%8%e!<%j%s%0$N%Q%i%a!<%?$d%j%=!<%9@)8f(B,$B<1JL>pJs$r4^$`(B
	$B%+!<%M%k%l%Y%k$N>uBV$+$i9=@.$5$l$F$$$^$9(B.
	$B%3%s%F%-%9%H$K$O%+!<%M%k$,%W%m%;%9$K%5!<%S%9$r(B
	$BDs6!$9$k;~$K;HMQ$9$kA4$F$,4^$^$l$F$$$^$9(B.
	$B%f!<%6$O%W%m%;%9$r@8@.$7(B,$B<B9T$r@)8f$7(B,
	$B%W%m%;%9$N<B9T>uBV$,JQ2=$7$?$H$-$KDLCN$r<u$1<h$k$3$H$,$G$-$^$9(B.
	$B$9$Y$F$N%W%m%;%9$K$O(B<emphasis>$B%W%m%;%9(BID</emphasis>(PID)
	$B$H8F$P$l$k%f%K!<%/$JCM$,3d$jEv$F$i$l$^$9(B.
	$B$3$NCM$O%+!<%M%k$,%f!<%6$K<B9T>uBV$NJQ2=$rJs9p$9$k$H$-$K%W%m%;%9$N?H85$r3NG'$7$?$j(B,
	$B%f!<%6$,%7%9%F%`%3!<%k$r<B9T$9$k$?$a$K;2>H$9$k$N$K;HMQ$5$l$^$9(B.</para>
      
      <para>The kernel creates a process by duplicating the context of another process.
	The new process is termed a
	<emphasis>child process</emphasis>
	of the original
	<emphasis>parent process</emphasis>
	The context duplicated in process creation includes
	both the user-level execution state of the process and
	the process's system state managed by the kernel.
	Important components of the kernel state are described in
	Chapter 4.</para>
     <para>$B%+!<%M%k$OB>$N%W%m%;%9$N%3%s%F%-%9%H$rJ#@=$7$F%W%m%;%9$r@8@.$7$^$9(B.
	$B?7$7$/@8@.$5$l$?%W%m%;%9$r(B
	$B85$N(B<emphasis>$B?F%W%m%;%9(B</emphasis>$B$N(B
	<emphasis>$B;R%W%m%;%9(B</emphasis>$B$H8F$S$^$9(B.
	$B%W%m%;%9@8@.;~$KJ#@=$5$l$?%3%s%F%-%9%H$O%f!<%6%l%Y%k$N%W%m%;%9$N<B9T>uBV$H(B
	$B%+!<%M%k$,4IM}$7$F$$$k%W%m%;%9$N%7%9%F%`>uBV$NN>J}$r4^$s$G$$$^$9(B.
	$B%+!<%M%k$N>uBV$K4X$9$k=EMW$J9=@.MWAG$K$D$$$F$O86=q$NBh(B4$B>O$K5-=R$5$l$F$$$^$9(B.</para>
      
      <figure id="fig-process-lifecycle">
	<title>Process lifecycle</title>
	<title>$B%W%m%;%9$N%i%$%U%5%$%/%k(B</title>
	
	<mediaobject>
	  <imageobject>
	    <imagedata fileref="fig1" format="EPS">
	  </imageobject>

	  <textobject>
	    <literallayout class="monospaced">+----------------+               wait               +----------------+
| parent process |--------------------------------->| parent process |--->
+----------------+                                  +----------------+
        |                                                   ^
        | fork                                              |
        V                                                   |
+----------------+ execve +----------------+  wait  +----------------+
|  child process |------->|  child process |------->| zombie process |
+----------------+        +----------------+        +----------------+</literallayout>
	  </textobject>
	  
	  <textobject>
	    <phrase>Process-management system calls</phrase>
	    <phrase>$B%W%m%;%94IM}%7%9%F%`%3!<%k(B</phrase>
	  </textobject>
	</mediaobject>
      </figure>
      
      <para>The process lifecycle is depicted in <xref linkend="fig-process-lifecycle">.
	A process may create a new process that is a copy of the original
	by using the
	<emphasis>fork</emphasis>
	system call.
	The
	<emphasis>fork</emphasis>
	call returns twice: once in the parent process, where
	the return value is the process identifier of the child,
	and once in the child process, where the return value is 0.
	The parent-child relationship induces a hierarchical structure on
	the set of processes in the system.
	The new process shares all its parent's resources, such as
	file descriptors, signal-handling status, and memory layout.</para>
      <para>$B%W%m%;%9$N%i%$%U%5%$%/%k$O(B<xref linkend="fig-process-lifecycle">$B$KIA$+$l$?$h$&$K$J$C$F$$$^$9(B.
	$B%W%m%;%9$O(B<emphasis>fork</emphasis>$B%7%9%F%`%3!<%k$rMQ$$$F(B
	$B85$N%W%m%;%9$N%3%T!<$H$7$F?7$7$$%W%m%;%9$r@8@.$9$k$3$H$,$G$-$^$9(B.
	<emphasis>fork</emphasis>$B$O8F$S=P$9$H(B
	2$BEYLa$j$^$9(B: $B0lJ}$O?F%W%m%;%9$K;R%W%m%;%9$N%W%m%;%9(BID$B$rJV$7(B,
	$B$b$&0lJ}$O;R%W%m%;%9$K(B0$B$rJV$7$^$9(B.
	$B?F;R4X78$O%7%9%F%`>e$N%W%m%;%9$NAH$K3,AX9=B$$r$b$?$i$7$^$9(B.
	$B?7$7$/@8@.$5$l$?%W%m%;%9$O%U%!%$%k%G%#%9%/%j%W%?$d%7%0%J%k%O%s%I%i$N>uBV(B,
	$B%a%b%j%l%$%"%&%H$N$h$&$J?F$,;}$C$F$$$k%j%=!<%9A4$F$r6&M-$7$^$9(B.</para>

      <para>Although there are occasions when the new process is intended
	to be a copy of the parent,
	the loading and execution of a different program is
	a more useful and typical action.
	A process can overlay itself with the memory image of another program,
	passing to the newly created image a set of parameters,
	using the system call
	<emphasis>execve</emphasis>.
	One parameter is the name of a file whose contents are
	in a format recognized by the system -- either a binary-executable file
	or a file that causes
	the execution of a specified interpreter program to process its contents.</para>
	  <para>$B?F$N%3%T!<$H$7$F@8@.$5$l$??7$7$$%W%m%;%9$G$"$C$F$b(B
	$BJL$N%W%m%0%i%`$r%m!<%I$7<B9T$9$k$3$H$G$h$jJXMx$GFCM-$NF0:n$r$9$k$3$H$b$G$-$^$9(B.
	$B%W%m%;%9$O(B<emphasis>execve</emphasis>$B%7%9%F%`%3!<%k$rMQ$$$k$3$H$G(B,
	$BJL$N%W%m%0%i%`$N%a%b%j%$%a!<%8$G<+J,<+?H$r>e=q$-$7$F(B,
	$B?7$7$$0z?t$NAH$r$=$N?7$7$/:n@.$7$?%$%a!<%8$K0z$-EO$9$3$H$,$G$-$^$9(B.
	$B0z?t$N$R$H$D$O%7%9%F%`$GG'<1$5$l$k%U%)!<%^%C%H(B
	($B%P%$%J%j<B9T%U%!%$%k$d%$%s%?%i%W%?%W%m%0%i%`$N5/F0$rB%$9%U%!%$%k(B)$B$r$7$?$N%U%!%$%k$NL>A0$G$9(B.</para>

      <para>A process may terminate by executing an
	<emphasis>exit</emphasis>
	system call, sending 8 bits of
	exit status to its parent.
	If a process wants to communicate more than a single byte of
	information with its parent,
	it must either set up an interprocess-communication channel
	using pipes or sockets,
	or use an intermediate file.
	Interprocess communication is discussed extensively in
	Chapter 11.</para>
	<para>$B%W%m%;%9$O(B<emphasis>exit</emphasis>$B%7%9%F%`%3!<%k$r<B9T$9$k$3$H$G(B
	$B?F%W%m%;%9$K(B8$B%S%C%H$N(Bexit$B%9%F!<%?%9$rAw?.$7$F=*N;$9$k$3$H$,$G$-$^$9(B.
	$B$b$7%W%m%;%9$,(B1$B%P%$%H0J>e$N>pJs$r?F%W%m%;%9$KEA$($?$$>l9g$K$O(B,
	$B%Q%$%W$d%=%1%C%H(B,$B$^$?$OCg2p%U%!%$%k$rMQ$$$F(B
	$B%W%m%;%94VDL?.%A%c%M%k$r%;%C%H%"%C%W$7$F$*$+$J$1$l$P$J$j$^$;$s(B.
	$B%W%m%;%94VDL?.$K$D$$$F$O86=q$NBh(B11$B>O$G>\$7$/5DO@$5$l$F$$$^$9(B.</para>
      
      <para>A process can suspend execution until any of its child processes terminate
	using the
	<emphasis>wait</emphasis>
	system call, which returns the
	PID
	and
	exit status of the terminated child process.
	A parent process can arrange to be notified by a signal when
	a child process exits or terminates abnormally.
	Using the
	<emphasis>wait4</emphasis>
	system call, the parent can retrieve information about
	the event that caused termination of the child process
	and about resources consumed by the process during its lifetime.
	If a process is orphaned because its parent exits before it is finished,
	then the kernel arranges for the child's exit status to be passed back
	to a special system process
	<!-- FIXME, the emphasis is wrong -->
	<emphasis>init</emphasis>:
	see Sections 3.1 and 14.6).</para>
	  <para>$B%W%m%;%9$O(B<emphasis>wait</emphasis>$B%7%9%F%`%3!<%k$rMQ$$$F(B
	$B;R%W%m%;%9$N$$$E$l$+$,=*N;$9$k$^$G<B9T$rCfCG$9$k$3$H$,$G$-(B,
	wait$B%7%9%F%`%3!<%k$O=*N;$7$?;R%W%m%;%9$N(BPID$B$H(Bexit$B%9%F!<%?%9$rJV$7$^$9(B.
	$B?F%W%m%;%9$O;R%W%m%;%9$,=*N;$^$?$O0[>o=*N;$7$?$H$-$N%7%0%J%k$K$h$kDLCN$N$5$lJ}$rD4@0$G$-$^$9(B.
	<emphasis>wait4</emphasis>$B%7%9%F%`%3!<%k$r;HMQ$9$k$H(B,
	$B?F%W%m%;%9$O;R%W%m%;%9$N=*N;$r0z$-5/$3$7$?%$%Y%s%H$K$D$$$F$H(B
	$B;R%W%m%;%9$,@8B84|4V$K>CHq$7$?%j%=!<%9$K$D$$$F$N>pJs$r<hF@$9$k$3$H$,$G$-$k$h$&$K$J$j$^$9(B.
	$B$b$7?F%W%m%;%9$,@h$K=*N;$7$?$?$a$K%*!<%U%!%s%I(B($B?F$N$J$$>uBV(B)$B$K$J$C$F$7$^$C$?>l9g$K$O(B,
	$B%+!<%M%k$,(B<emphasis>init</emphasis>$B$H$$$&FCJL$J%W%m%;%9$K$=$N;R%W%m%;%9$N(B
	$B=*N;%9%F!<%?%9$,EO$5$l$k$h$&$KD4@0$7$^$9(B.
	($B86=q$N%;%/%7%g%s(B3.1$B$H(B14.6$B$r$4Mw2<$5$$;2>H$7$F2<$5$$(B)</para>
      
      <para>The details of how the kernel creates and destroys processes are given in
	Chapter 5.</para>
	  <para>$B%+!<%M%k$,G!2?$K$7$F%W%m%;%9$r@8@.$7>CLG$5$;$k$+$N>\:Y$K$D$$$F$O(B
	"The Design and Implementation of the 4.4BSD Operating System"$B$NBh(B5$B>O$r$4Mw2<$5$$(B.</para>

      <para>Processes are scheduled for execution according to a
	<emphasis>process-priority</emphasis>
	parameter.
	This priority is managed by a kernel-based scheduling algorithm.
	Users can influence the scheduling of a process by specifying
	a parameter
	(<emphasis>nice</emphasis>)
	that weights the overall scheduling priority,
	but are still obligated to share the underlying
	CPU
	resources according to the kernel's scheduling policy.</para>
	  <para>$B%W%m%;%9$O(B<emphasis>$B%W%m%;%9M%@hEY(B</emphasis>$B$H$$$&%Q%i%a!<%?$K=>$C$F(B
	$B<B9T$r%9%1%8%e!<%k$5$l$^$9(B.
	$B$3$NM%@hEY$O%+!<%M%k%Y!<%9$N%9%1%8%e!<%j%s%0%"%k%4%j%:%`$K$h$C$F4IM}$5$l$F$$$^$9(B.
	$B%f!<%6$O%9%1%8%e!<%j%s%0$NM%@hEYA4BN$K=E$_$E$1$9$kFCJL$J%Q%i%a!<%?(B
	(<emphasis>nice</emphasis>)$B$K$h$C$F%W%m%;%9$N<B9TM%@hEY$K1F6A$rM?$($k$3$H$,$G$-$^$9$,(B,
	$BK\<AE*$J(BCPU$B%j%=!<%9$NG[J,$O%+!<%M%k$N%9%1%8%e!<%j%s%0%]%j%7!<$K=>$C$F7hDj$5$l$l$^$9(B.</para>

      <sect2>
	<title>Signals</title>
	<title$B%7%0%J%k(B</title>

	<para>The system defines a set of
	  <emphasis>signals</emphasis>
	  that may be delivered to a process.
	  Signals in 4.4BSD are modeled after hardware interrupts.
	  A process may specify a user-level subroutine to be a
	  <emphasis>handler</emphasis>
	  to which a signal should be delivered.
	  When a signal is generated,
	  it is blocked from further occurrence while it is being
	  <emphasis>caught</emphasis>
	  by the handler.
	  Catching a signal involves saving the current process context
	  and building a new one in which to run the handler.
	  The signal is then delivered to the handler, which can either abort
	  the process or return to the executing process
	  (perhaps after setting a global variable).
	  If the handler returns, the signal is unblocked
	  and can be generated (and caught) again.</para>
	<para>$B%7%9%F%`$O%W%m%;%9$+$iEAC#$5$l$k$G$"$m$&(B
	  <emphasis>$B%7%0%J%k(B</emphasis>$B0l<0$rDj5A$7$F$$$^$9(B.
	  4.4BSD$B$K$*$1$k%7%0%J%k$O%O!<%I%&%'%"3d$j9~$_$r%b%G%k$H$7$F$$$^$9(B.
	  $B%W%m%;%9$O%f!<%6%l%Y%k$N%5%V%k!<%A%s$r%7%0%J%k$,EAC#$5$l$k(B
	  <emphasis>$B%O%s%I%i(B</emphasis>$B$H$7$F;XDj$G$-$^$9(B.
	  $B%7%0%J%k$,H/@8$7$F(B,$B$=$l$,%O%s%I%i$K$h$C$F(B<emphasis>$BJaB*(B</emphasis>$B$5$l$F$$$k4V$O(B
	  $B$5$i$J$k%7%0%J%k$NH/@8$O%V%m%C%/$5$l$^$9(B.
	  $B%7%0%J%k$NJaB*$O8=:_$N%W%m%;%9$N%3%s%F%-%9%H$rJ]B8$9$k$3$H$H(B
	  $B%O%s%I%i$r<B9T$9$k$?$a$N?7$?$J%3%s%F%-%9%H$r9=C[$9$k$3$H$rH<$$$^$9(B.
	  $B%7%0%J%k$O%O%s%I%i$KDLC#$5$l$k$H(B, $B%W%m%;%9$r%"%\!<%H$9$k$3$H$b(B
	  $B<B9TCf$N%W%m%;%9$K(B($B$*$=$i$/%0%m!<%P%kJQ?t$KCM$r%;%C%H$7$F$+$i(B)$BLa$k$3$H$b$G$-$^$9(B.
	  $B%O%s%I%i$+$i$b$I$k$H(B,$B$=$N%7%0%J%k$O%V%m%C%/$5$l$J$/$J$j(B
	  $B$=$7$F:F$SH/@8$9$k(B($B$=$7$FJaB*$5$l$k(B)$B$3$H$b2DG=$K$J$j$^$9(B.</para>
	
	<para>Alternatively, a process may specify that a signal is to be
	  <emphasis>ignored</emphasis>,
	  or that a default action, as determined by the kernel, is to be taken.
	  The default action of certain signals is to terminate the process.
	  This termination may be accompanied by creation of a
	  <emphasis>core file</emphasis>
	  that contains the current memory image of the process for use
	  in postmortem debugging.</para>
	<para>$B$^$?(B,$B%W%m%;%9$O%7%0%J%k$r(B<emphasis>$BL5;k(B</emphasis>$B$9$k$3$H$d(B,
	  $B%+!<%M%k$GDj5A$5$l$F$$$k%G%U%)%k%H$NF0:n$r9T$&$h$&$K;XDj$9$k$3$H$,$G$-$^$9(B.
	  $B$"$k<o$N%7%0%J%k$N%G%U%)%k%H$G$NF0:n$O%W%m%;%9$r=*N;$5$;$k$3$H$G$9(B.
	  $B$3$N$h$&$J>l9g$N=*N;$O;v8e$N%G%P%C%0$K;HMQ$G$-$k$h$&$K%W%m%;%9$N%a%b%j%$%a!<%8$r4^$s$@(B
	  <emphasis>$B%3%"%U%!%$%k(B</emphasis>$B$N@8@.$rH<$$$^$9(B.</para>
	
	<para>Some signals cannot be caught or ignored.
	  These signals include
	  <emphasis>SIGKILL</emphasis>,
	  which kills runaway processes,
	  and the
	  job-control signal
	  <emphasis>SIGSTOP</emphasis>.</para>
	<para>$B$$$/$D$+$N%7%0%J%k$OJaB*$9$k$3$H$bL5;k$9$k$3$H$b$G$-$^$;$s(B.
	  $B$3$l$i$N%7%0%J%k$K$OK=Av$7$?%W%m%;%9$rDd;_$5$;$k(B
	  <emphasis>SIGKILL</emphasis>$B$d(B,
	  $B%8%g%V%3%s%H%m!<%k%7%0%J%k$G$"$k(B
	  <emphasis>SIGSTOP</emphasis>$B$,4^$^$l$F$$$^$9(B.</para>

	<para>A process may choose to have signals delivered on a
	  special stack so that sophisticated software stack manipulations
	  are possible.
	  For example, a language supporting
	  coroutines needs to provide a stack for each coroutine.
	  The language run-time system can allocate these stacks
	  by dividing up the single stack provided by 4.4BSD.
	  If the kernel does not support a separate signal stack,
	  the space allocated for each coroutine must be expanded by the
	  amount of space required to catch a signal.</para>
	<para>$B%W%m%;%9$O%7%0%J%k$rFCJL$J%9%?%C%/$KEAC#$5$l$k$h$&$K$9$k$3$H$bA*Br$G$-$k$N$G(B
	  $B@vN}$5$l$?%=%U%H%&%'%"%9%?%C%/A`:n$,2DG=$G$9(B.
	  $BNc$($P(B, $B%3%k!<%A%s$r%5%]!<%H$7$F$$$k8@8l$G$O(B
	  $B$=$l$>$l$N%3%k!<%A%s$K%9%?%C%/$rDs6!$9$kI,MW$,$"$j$^$9(B.
	  $B$=$N8@8l$N<B9T%7%9%F%`$O(B4.4BSD$B$K$h$C$FDs6!$5$l$kC10l$N%9%?%C%/$rJ,G[$9$k$3$H$G(B
	  $B$3$l$i$N%9%?%C%/$r3d$jEv$F$k$3$H$,$G$-$^$9(B.
	  $B$b$7%+!<%M%k$,JL!9$N%7%0%J%k%9%?%C%/$r%5%]!<%H$7$F$$$J$1$l$P(B,
	  $B$=$l$>$l$N%3%k!<%A%s$K3d$jEv$F$i$l$?NN0h$O(B
	  $B%7%0%J%k$NJaB*$KI,MW$JJ,$@$13HD%$5$l$J$1$l$P$J$j$^$;$s(B.</para>

	<para>All signals have the same <emphasis>priority</emphasis>.
	  If multiple signals are pending simultaneously, the order in which
	  signals are delivered to a process is implementation specific.
	  Signal handlers execute with the signal that caused their
	  invocation to be blocked, but other signals may yet occur.
	  Mechanisms are provided so that processes can protect critical sections
	  of code against the occurrence of specified signals.</para>
	<para>$BA4$F$N%7%0%J%k$OF1$8(B<emphasis>$BM%@hEY(B</emphasis>$B$r;}$C$F$$$^$9(B.
	  $B$b$7J#?t$N%7%0%J%k$,F1;~$KL$=hM}$H$J$C$F$$$k>l9g$O(B,
	  $B%7%0%J%k$,EAC#$5$l$k=g=x$O<BAu>e$NDj5A$K$h$j$^$9(B.
	  $B%7%0%J%k%O%s%I%i$O%7%0%J%k$,H/@8$7$?$H$-$K(B
	  $BB>$N%7%0%J%k$,H/@8$9$k$+$b$7$l$J$$$,%V%m%C%/$5$l$k$3$H$r5'$j$D$D=hM}$r9T$$$^$9(B.
	  $B$3$N%a%+%K%:%`Ds6!$5$l$F$$$k$N$G%W%m%;%9$O;XDj$5$l$?%7%0%J%k$NH/@8$KBP$9$k(B
	  $B%3!<%I$N%/%j%F%#%+%k$JItJ,$rJ]8n$9$k$3$H$,$G$-$^$9(B.</para>

	<para>The detailed design and implementation of signals is described in
	  Section 4.7.</para>
	<para>$B%7%0%J%k$N@_7W$H<BAu$N>\:Y$O86=q$N%;%/%7%g%s(B4.7$B$K5-=R$5$l$F$$$^$9(B.</para>
      </sect2>
    
      <sect2>
	<title>Process Groups and Sessions</title>
	<title>$B%W%m%;%9%0%k!<%W$H%;%C%7%g%s(B</title>

	<para>Processes are organized into
	  <emphasis>process groups</emphasis>.
	  Process groups are used to control access to terminals
	  and to provide a means of distributing signals to collections of
	  related processes.
	  A process inherits its process group from its parent process.
	  Mechanisms are provided by the kernel to allow a process to
	  alter its process group or the process group of its descendents.
	  Creating a new process group is easy;
	  the value of a new process group is ordinarily the
	  process identifier of the creating process.</para>
	<para>$B%W%m%;%9$O(B<emphasis>$B%W%m%;%9%0%k!<%W(B</emphasis>$B$KB0$7$F$$$^$9(B.
	  $B%W%m%;%9%0%k!<%W$O%?!<%_%J%k$X$N%"%/%;%9$N@)8f$d(B
	  $B4X78%W%m%;%9$N=89g$K%7%0%J%k$rAw$k<jCJ$r6!5k$9$k$N$K;HMQ$5$l$^$9(B.
	  $B%W%m%;%9$O?F%W%m%;%9$+$i%W%m%;%9%0%k!<%W$r0z$-7Q$.$^$9(B.
	  $B%W%m%;%9$K$O<+J,<+?H$^$?$O<+J,$N;RB9$N%W%m%;%9%0%k!<%W$NJQ99$r5v2D$9$k(B
	  $B%a%+%K%:%`$,%+!<%M%k$+$iDs6!$5$l$F$$$^$9(B.
	  $B?7$7$$%W%m%;%9%0%k!<%W$r:n@.$9$k$3$H$O4JC1$G$9(B;
	  $B?7$7$$%W%m%;%9%0%k!<%W$NCM$O$?$$$F$$(B
	  $B:n@.$7$?%W%m%;%9$N%W%m%;%9(BID$B$H$J$j$^$9(B.</para>
	
	<para>The group of processes in a process group is sometimes
	  referred to as a
	  <emphasis>job</emphasis>
	  and is manipulated by high-level system software, such as the shell.
	  A common kind of job created by a shell is a
	  <emphasis>pipeline</emphasis>
	  of several processes connected by pipes, such that the output of the first
	  process is the input of the second, the output of the second is the
	  input of the third, and so forth.
	  The shell creates such a job by forking a
	  process for each stage of the pipeline,
	  then putting all those processes into a separate process group.</para>
	<para>$B%W%m%;%9%0%k!<%W$K$*$1$k%W%m%;%9$N=89g$O$H$-$*$j(B<emphasis>job</emphasis>$B$H8F$P$l(B,
	  $B%7%'%k$N$h$&$J9b%l%Y%k$N%7%9%F%`%=%U%H%&%'%"$GA`:n$5$l$^$9(B.
	  $B%7%'%k$K$h$C$F@8@.$5$l$k$h$/$"$kN`$N%8%g%V$O$$$/$D$+$N%W%m%;%9$r%Q%$%W$G$D$J$$$@(B
	  <emphasis>$B%Q%$%W%i%$%s(B</emphasis>$B$G(B, $B:G=i$N%W%m%;%9$N=PNO$,(B2$BHVL\$NF~NO$H$J$j(B,
	  2$BHVL\$N=PNO$,(B3$BHVL\$NF~NO$H$J$j(B, 4$BHVL\$,(B...$B$H$$$&46$8$K$J$j$^$9(B.
	  $B%7%'%k$O%Q%$%W%i%$%s$N3FCJ3,$K$*$$$F%W%m%;%9$r(Bfork$B$7$F(B, 
	  $B$3$l$iA4$F$N%W%m%;%9$rJL8D$N%W%m%;%9%0%k!<%W$K$*$/$3$H$G(B
	  $B$3$N$h$&$J%8%g%V$r@8@.$7$^$9(B.</para>

	<para>A user process can send a signal to each process in
	  a process group, as well as to a single process.
	  A process in a specific process group may receive
	  software interrupts affecting the group, causing the group to
	  suspend or resume execution, or to be interrupted or terminated.</para>
	<para>$B%f!<%6%W%m%;%9$OC1FH$N%W%m%;%9$KAw$k>l9g$HF1MM$K(B
	  $B%W%m%;%9%0%k!<%W$N$=$l$>$l$N%W%m%;%9$K$^$H$a$F%7%0%J%k$rAw$k$3$H$,$G$-$^$9(B.
	  $B;XDj$5$l$?%W%m%;%9%0%k!<%WFb$N%W%m%;%9$O(B
	  $B%W%m%;%9%0%k!<%W$KBP$9$k%=%U%H%&%'%"3d$j9~$_$r<u$1<h$j(B,
	  $B$=$l$K$h$C$F%W%m%;%9%0%k!<%W$O%5%9%Z%s%I$7$?$j$d<B9T$r:F3+$7$?$j(B, 
	  $B3d$j9~$_$r<u$1$?$j$d=*N;$5$;$i$l$?$j$7$^$9(B.</para>
	
	<para>A terminal has a process-group identifier assigned to it.
	  This identifier is normally set to the identifier of a process group
	  associated with the terminal.
	  A job-control shell may create a number of process groups
	  associated with the same terminal; the terminal is the
	  <emphasis>controlling terminal</emphasis>
	  for each process in these groups.
	  A process may read from a descriptor for its controlling terminal
	  only if the terminal's process-group identifier
	  matches that of the process.
	  If the identifiers do not match,
	  the process will be blocked if it attempts to read from the terminal.
	  By changing the process-group identifier of the terminal,
	  a shell can arbitrate a terminal among several different jobs.
	  This arbitration is called
	  <emphasis>job control</emphasis>
	  and is described, with process groups, in
	  Section 4.8.</para>
	<para>$BC<Kv$K$O%W%m%;%9%0%k!<%W(BID$B$,3d$jEv$F$i$l$F$$$^$9(B.
	  $B$3$N(BID$B$ODL>oC<Kv$K4XO"IU$1$i$l$?%W%m%;%9%0%k!<%W$N(BID$B$,%;%C%H$5$l$^$9(B.
	  $B%8%g%V%3%s%H%m!<%k5!G=IU$-$N%7%'%k$OF1$8C<Kv$K4XO"IU$1$5$l$?(B
	  $B$$$/$D$+$N%W%m%;%9%0%k!<%W$r:n@.$9$k$3$H$,$G$-$^$9(B;
	  $BC<Kv$O$3$l$i$N%W%m%;%9%0%k!<%W$KB0$9$k%W%m%;%9$N(B<emphasis>$B@)8fC<Kv(B</emphasis>$B$H$J$j$^$9(B.
	  $B%W%m%;%9$OC<Kv$N%W%m%;%9%0%k!<%W(BID$B$H<+J,$N%W%m%;%9%0%k!<%W(BID$B$,0lCW$7$?$H$-$N$_(B
	  $B@)8fC<Kv$r%G%#%9%/%j%W%?$+$iFI$_<h$j$^$9(B.
	  $B$b$7(BID$B$,0lCW$7$F$$$J$1$l$P(B, $B%W%m%;%9$OC<Kv$+$iFI$_<h$m$&$H$7$?$i%V%m%C%/$5$l$F$7$^$$$^$9(B.
	  $BC<Kv$N%W%m%;%9%0%k!<%W(BID$B$rJQ99$9$k$3$H$G(B
	  $B%7%'%k$O$$$/$D$+$N0[$J$k%8%g%V$N4V$GC<Kv$rD4Dd$9$k$3$H$,$G$-$^$9(B.
	  $B$3$ND4Dd$O(B<emphasis>$B%8%g%V%3%s%H%m!<%k(B</emphasis>$B$H8F$P$l(B
	  $B%W%m%;%9%0%k!<%W$H$H$b$K86=q$N%;%/%7%g%s(B4.8$B$K5-=R$5$l$F$$$^$9(B.</para>
	
	<para>Just as a set of related processes can be collected into a process group,
	  a set of process groups can be collected into a
	  <emphasis>session</emphasis>.
	  The main uses for sessions are to create an isolated environment for a
	  daemon process and its children,
	  and to collect together a user's login shell
	  and the jobs that that shell spawns.</para>
	<para>$B4XO"$N$"$k%W%m%;%9$N=89g$r%W%m%;%9%0%k!<%W$H$7$F$^$H$a$i$l$k$h$&$K(B
	  $B%W%m%;%9%0%k!<%W$N=89g$r(B<emphasis>$B%;%C%7%g%s(B</emphasis>$B$H$7$F$^$H$a$k$3$H$,$G$-$^$9(B.
	  $B%;%C%7%g%s$N<g$J;HMQNc$O%G!<%b%s%W%m%;%9$H$=$N;R$KBP$7$F3VN%$7$?4D6-$r:n$j=P$7$?$j(B,
	  $B%f!<%6$N%m%0%$%s%7%'%k$H$=$N%7%'%k$,:n$j=P$9%8%g%V$r$R$H$^$H$a$K$9$k$3$H$G$9(B.</para>
      </sect2>
    </sect1>

----Next_Part(Tue_May__8_02:56:51_2001_559)----
