home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume25 / pty4 / part09 / JOBCTRL.draft3
Encoding:
Text File  |  1992-02-18  |  24.2 KB  |  495 lines

  1. How to add job control to a UNIX system
  2. Daniel J. Bernstein
  3. draft 3
  4. 8/3/91
  5.  
  6.  
  7. Abstract
  8.  
  9. We describe in detail the steps necessary to add BSD-style job control
  10. to any UNIX system. In place of the BSD and POSIX rules for controlling
  11. ttys, sessions, and process groups, we propose a very simple yet secure
  12. mechanism for manipulating process groups alone. This mechanism can also
  13. be added to existing BSD systems to provide an alternate, easier-to-use
  14. programming interface.
  15.  
  16.  
  17. 1. Introduction
  18.  
  19. Sections 2 through 6 describe selected portions of BSD 4.2 and 4.3 job
  20. control. Omitted is any mention of controlling ttys, POSIX sessions,
  21. getpgrp() and setpgrp(), TIOCGPGRP and TIOCSPGRP, tcgetpgrp() and
  22. tcsetpgrp(), TIOCNOTTY, setsid(), TIOCSCTTY, setpgid(), open() with or
  23. without O_NOCTTY, and the relations between all of those and the rest of
  24. the job control system, because it turns out that none of that is
  25. necessary to provide job control. The attitude in these sections is that
  26. of someone faced with a System V variant or a new UNIX system (e.g.,
  27. MINIX) with no job control facilities in the first place, perhaps
  28. without even the concept of a controlling tty; the important question is
  29. how little work is necessary to add job control features.
  30.  
  31. Section 7 describes my new, secure, extremely simple job control
  32. programming interface [1]. (The interface was inspired by a comment from
  33. Chris Torek. It was modified slightly in response to criticism by
  34. John Carr. It is dedicated to Marc Teitelbaum.) The interface is enough
  35. to let programmers implement a job control shell or any other job
  36. control-cognizant applications. It solves all the problems that POSIX
  37. sessions were meant to solve, but it is much, much simpler, and can be
  38. added to a system with a minimum of effort. It can even be added to a
  39. BSD system, as discussed in section 8---it does not interfere with the
  40. old job control model in any way. This will give programmers a choice
  41. between the older, more complicated interface and this new, easy-to-use
  42. interface.
  43.  
  44. Section 9 lists several job control programming techniques. Finally,
  45. section 10, again from the point of view of a system without job
  46. control, lists some common macros and similar cpp-level extensions
  47. which make job control programs easier to port.
  48.  
  49.  
  50. 2. New kernel structures
  51.  
  52. Each process ``is a member of'' a process group. In other words, there's
  53. a p_pgrp integer inside struct proc. init starts out in process group 0.
  54. Process groups remain the same across fork() and exec().
  55.  
  56. Each tty has a ``foreground'' process group. In other words, there's a
  57. t_pgrp integer inside struct tty. (Systems where ttys are implemented
  58. differently, e.g., via streams, will have to store this information
  59. somewhere else.) A tty opened for the first time has t_pgrp set to 0.
  60. Each tty also has one extra keyboard character, the suspend character,
  61. with a default of 26 (^Z).
  62.  
  63. There is a new process state (i.e., p_stat value): SSTOP. (ps usually
  64. reports this state as T.) When a process is in this state, it gets no
  65. CPU time. All signals are blocked until it leaves the state. Note that
  66. systems with some form of process tracing (e.g., ptrace(2)) already have
  67. SSTOP.
  68.  
  69.  
  70. 3. Signals
  71.  
  72. There are five new signals declared in <signal.h>: SIGSTOP (17), SIGTSTP
  73. (18), SIGCONT (19), SIGTTIN (21), SIGTTOU (22). (The numbers in
  74. parentheses are the standard BSD values.) Any code which works with bit
  75. masks representing signals must be prepared to work with 32-bit masks.
  76.  
  77. The default action of a process receiving SIGSTOP, SIGTSTP, SIGTTIN, or
  78. SIGTTOU is to stop, i.e., enter the SSTOP state and, as detailed below,
  79. to generate a SIGCHLD. SIGSTOP cannot be blocked, caught, or ignored.
  80. (``Blocking'' refers to any mechanism by which the receipt of a signal
  81. is deferred. BSD provides sigblock() and sigsetmask() to manipulate a
  82. bit mask of blocked signals. On systems without a similar mechanism,
  83. SIGSTOP obviously can't be blocked in the first place. What's important
  84. is tht SIGSTOP always take effect immediately.)
  85.  
  86. Any process which receives SIGCONT will continue, i.e., leave the SSTOP
  87. state; this is in addition to any signal handler installed. (Obviously
  88. the process cannot execute a signal handler if it's in the SSTOP state,
  89. receiving no CPU time!) SIGCONT cannot be blocked. A process is always
  90. able to send SIGCONT to any of its children, regardless of permission
  91. checks. (BSD actually lets you send SIGCONT to any descendant. Some
  92. popular BSD variants do not obey this rule.)
  93.  
  94. When a process enters the SSTOP state, it generates a SIGCHLD (aka
  95. SIGCLD) to its parent. There are several conflicting sets of semantics
  96. for SIGCHLD/SIGCLD (e.g., what happens when it's ignored? when are
  97. zombies created?) on various systems, none of which have any relevance
  98. to job control.
  99.  
  100.  
  101. 4. Waiting
  102.  
  103. When the parent, either upon receiving a SIGCHLD or at any other time,
  104. does a wait(), it will not see any stopped children---i.e., job control
  105. doesn't change the semantics of wait(). (Process tracing does, but that
  106. is also irrelevant to job control.) There is a new system call, wait2,
  107. which lets the parent see stopped children:
  108.  
  109.   #include <sys/wait.h>
  110.  
  111.   int wait2(status,options)
  112.   int *status;
  113.   int options;
  114.  
  115. (In fact, BSD has a wait3() call instead of wait2(); the above call is
  116. the same as wait3(status,options,(struct rusage *) 0). See section 10
  117. for further details.) options is a bit field. You have to define two
  118. bits, WNOHANG and WUNTRACED, in <sys/wait.h>, for use as options.
  119.  
  120. Normally wait2() acts like wait(): it blocks waiting for a child to die
  121. and then returns the dead pid, or returns -1 immediately if there are no
  122. live children. If options includes WNOHANG, wait2() will return 0
  123. immediately instead of blocking. If options includes WUNTRACED, wait2()
  124. will return the pid of a stopped child as well as the pid of a dead
  125. child. (By far the most common options value is WNOHANG | WUNTRACED.)
  126.  
  127. As usual, when wait2() returns a pid, status says what's happened to
  128. that pid. This is a bit more complicated than before because status also
  129. has to tell the parent what happened if the child stopped. Here's the
  130. whole story: If the low 7 bits are all set, the child has in fact
  131. stopped. If none of those bits are set, the child has exited normally.
  132. Otherwise the child has been terminated by a signal, and those 7 bits
  133. say which signal it was. (If the 8th bit is set in that case, the child
  134. dumped core.) If the child has stopped, the 8th bit is 0, and the 8 bits
  135. after that say which signal (SIGTTOU, for instance) stopped the process.
  136. If the child has exited, the 8th bit is 0, and the 8 bits after that
  137. give its exit code mod 256.
  138.  
  139.  
  140. 5. Terminal-generated signals
  141.  
  142. When the interrupt character (typically ^C under BSD, DEL under System V)
  143. is typed on a terminal in cooked mode, if the terminal's foreground
  144. process group is non-zero, every process in that process group is sent
  145. SIGINT. Similarly, the quit character (typically ^\ under BSD) generates
  146. SIGQUIT. If a terminal is ``hung up'', it generates SIGHUP. Job control
  147. needs one extra signal so that the user can tell the current process to
  148. stop: namely, the suspend character mentioned above (typically ^Z),
  149. which generates SIGTSTP. Notice that if a user could set his tty's
  150. process group arbitrarily, he could send all sorts of signals to any
  151. processes in those process groups. So it is important for security that
  152. tty process groups be controlled.
  153.  
  154. The suspend character is the first user interface aspect of job control
  155. mentioned so far. Typically the processes stop (though they can catch
  156. SIGTSTP and do something else). A job-control shell then receives the
  157. SIGCHLD and, with wait2(), sees that its children have stopped. It can
  158. report this to the user and present a new prompt. The user can then
  159. start more processes, or, with an ``fg'' (foreground) command, tell the
  160. shell to send SIGCONT to the children so that they start up again.
  161.  
  162. Programs can inspect and set the suspend character with two new tty
  163. ioctls: TIOCGLTC and TIOCSLTC, both defined in <sys/ioctl.h>. In both
  164. cases the argument points to a ``struct ltchars'' (defined in the same
  165. place), which contains a char t_suspc specifying the suspend character.
  166.  
  167. As a matter of fact, under BSD there are several other local terminal
  168. characters (that's what ltchars stands for), notably t_dsuspc. The
  169. delayed suspend character (typically ^Y) is supposed to act like the
  170. suspend character but only when a process actually reads it. However,
  171. several operating system releases from Sun simply don't do this. They
  172. pass dsusp through like any other character. Given that almost nobody
  173. ever notices this bug, let alone complains about it, I don't think
  174. there's any point in bothering to implement the character.
  175.  
  176.  
  177. 6. I/O-generated signals
  178.  
  179. There's another side to the job control user interface: namely, several
  180. processes (or pipelines---in general, ``jobs'') can read and write the
  181. tty at once. The job-control shell places each pipeline into a separate
  182. process group, and when any job except the foreground job reads from the
  183. tty, it is stopped until the user decides to give it input. This is much
  184. more flexible than cutting background processes off from the tty
  185. permanently, as non-job-control shells do.
  186.  
  187. More precisely, if a process reads from a tty, and its process group is
  188. not the foreground process group of the tty, then its process group is
  189. sent a SIGTTIN signal. As an exception, if that process is blocking or
  190. ignoring SIGTTIN, no signal is generated. Instead, the read returns -1
  191. with errno of EIO. ``Reading'' here includes only read(), not the
  192. various tty ioctls which inspect tty structures; while there are some
  193. benefits of generating SIGTTIN for the latter, this turns out to be too
  194. restrictive for many applications. (There is an ioctl, TIOCSTI, which is
  195. also lumped with ``reading,'' but a full discussion of TIOCSTI would be
  196. too long for this paper. It's not an important enough ioctl to bother
  197. with.)
  198.  
  199. If a process writes to a tty, and its process group is not the
  200. foreground process group of the tty, then its process group is sent a
  201. SIGTTOU signal. As an exception, if that process is blocking or ignoring
  202. SIGTTOU, no signal is generated and it is allowed to produce output.
  203. This time, ``write'' includes not only write() but also any other
  204. operations which affect the tty in any way. (Under BSD there is a tty
  205. mode, LTOSTOP, which when disabled turns off TTOU for write() but not
  206. for other operations. This is not absolutely necessary, but if you have
  207. any free time you should implement stty tostop to turn LTOSTOP on and
  208. stty -tostop to turn it off. The internal interface is unimportant as
  209. long as the user can select his favorite behavior.)
  210.  
  211. None of the above apply to operations by a process in process group 0.
  212. Process group 0 must never, ever, be sent I/O-generated signals. The
  213. simplest course of action here is to let all operations from process
  214. group 0 succeed. (What actually happens in this case isn't too
  215. important, as long as processes like getty can open a tty and start
  216. programs on the tty. Most BSD-derived systems set process group to pid
  217. when a process in process group 0 opens a tty; this behavior is not
  218. necessary. Note that if a process in process group 0 reads from a tty
  219. while a shell is still reading from it, the two read()s will compete for
  220. terminal input.)
  221.  
  222. Notice that if a process can join an arbitrary process group, it can
  223. cause SIGTTOU and SIGTTIN to be sent to other process. So it's important
  224. for security that processes' process groups be controlled.
  225.  
  226. Be careful in implementing I/O-generated signals that you test
  227. repeatedly for the right process group. The process could easily receive
  228. SIGCONT while the tty is in a different group. In that case it should
  229. immediately stop the process group again (without even executing a
  230. SIGCONT handler!), generate another SIGCHLD, and wait for the next
  231. SIGCONT. This can repeat any number of times. Only when the tty is in
  232. the right process group should the operation succeed.
  233.  
  234.  
  235. 7. A new, secure, simple job control programming interface
  236.  
  237. The process group calls described in this section are, unlike the job
  238. control features described in sections 2 through 6, not part of BSD,
  239. though they do not interfere with BSD. There are a total of three calls
  240. which manipulate process groups: tcnewpgrp(), settpgrp(), tctpgrp().
  241. Throughout this section, fdtty is a file descriptor pointing to a
  242. terminal.
  243.  
  244. If fdtty has write access, tcnewpgrp(fdtty) should allocate an unused
  245. process group and set the terminal's foreground process group to that
  246. new process group. This is a write operation and should produce SIGTTOU
  247. if this process is not in the foreground (and is not ignoring the
  248. signal, etc.). tcnewpgrp returns 0 on success, -1 with errno ENOTTY if
  249. fdtty is not a terminal, -1 with errno EBADF if fdtty is not open for
  250. writing.
  251.  
  252. If fdtty has read access, settpgrp(fdtty) should set this process's
  253. process group to the foreground process group of the terminal. As a
  254. special case, settpgrp(-1) sets this process's process group to 0, so
  255. that it is exempt from job control. The latter is redundant---a process
  256. can just as easily create a process group for itself, fork, and hide the
  257. child away inside that group---but convenient. settpgrp returns 0 on
  258. success, -1 with errno ENOTTY if fdtty is not -1 and not a terminal, -1
  259. with errno EBADF if fdtty is not open for reading.
  260.  
  261. If fdtty has write access, and pid is the current process or a child of
  262. the current process, tctpgrp(fdtty,pid) should set the terminal's
  263. foreground process group to the process group of pid. This is a write
  264. operation. You may want to allow pid to be any descendant of the current
  265. process (under BSD this simplifies the implementation), but this is not
  266. necessary for a job control shell, and nobody is going to depend on that
  267. behavior. tctpgrp returns 0 on success, -1 with errno ENOTTY if fdtty is
  268. not a terminal, -1 with errno ESRCH if pid does not exist, -1 with errno
  269. EPERM if pid exists but is not a child/descendant, -1 with errno EBADF
  270. if fdtty is not open for reading.
  271.  
  272. To implement tcnewpgrp() you need to set up a table (I recommend a
  273. chained hash table) of structures containing process group number and
  274. reference count. The reference count is the total number of processes
  275. and ttys with that process group. tcnewpgrp() can then search for a
  276. process group not in the table. The range of process group numbers is
  277. not important; a good choice for BSD systems is 32801-65000. However, it
  278. is important that there be more process groups available than the maximum
  279. possible number of ttys and pids in use at once.
  280.  
  281. Whenever a process is created, the reference count for its process group
  282. (if that group is not 0) must be incremented; whenever a process dies,
  283. the reference count for its process group (if that group is not 0) must
  284. be decremented; whenever a process changes process groups (e.g., via
  285. settpgrp()), the reference counts for old and new groups must be set
  286. appropriately; and whenever a tty changes process groups (e.g., via
  287. tcnewpgrp() or tctpgrp()), the reference counts must also be set
  288. appropriately. That's it.
  289.  
  290. A different implementation strategy has been suggested by John Carr: the
  291. system can simply assign group numbers in increasing order starting from
  292. boot time. If, for instance, a process group has 64 bits, and there are
  293. at most a billion process group manipulations per second, it will be
  294. more than 584 years before the numbers can repeat. Naturally, system
  295. administrators should keep a close eye on recently allocated process
  296. groups, and be prepared to bring the system down for maintenance as soon
  297. as there is any risk of repetition.
  298.  
  299. These three process group manipulation calls do not allow any abuse. To
  300. set a terminal to someone else's (nonzero) process group with tctpgrp(),
  301. an attacker would need a child process already in the group. But to put
  302. a process into someone else's (nonzero) process group with settpgrp(),
  303. an attacker would already need access to a tty with that group! There's
  304. no way to break into this circle. tcnewpgrp() is useless for attacks
  305. since it does not let an attacker join an existing group. Hence the
  306. system is secure. Together with the basic job control features outlined
  307. in sections 2 through 6, this provides a complete, usable job control
  308. system.
  309.  
  310. For comparison, BSD job control involves controlling ttys, and has six
  311. interface functions beyond the mechanisms mentioned in sections 2
  312. through 6: open() (of a tty), setpgrp(), getpgrp(), the TIOCGPGRP ioctl,
  313. the TIOCSPGRP ioctl, and the TIOCNOTTY ioctl. Controlling terminals
  314. affect the entire job control system and make everything harder to
  315. program and use.
  316.  
  317. POSIX job control is even worse: it includes not only the entire
  318. complexity of the BSD interface, but it has ``sessions'' with effects
  319. even more pervasive than those of controlling terminals. (For instance,
  320. a process can only be stopped if its parent is in the *same* session but
  321. a *different* process group.)
  322.  
  323.  
  324. 8. Implementing the new job control interface in a BSD system
  325.  
  326. tcnewpgrp() requires kernel changes on any system; current systems do
  327. not recognize a range of process groups to be dynamically allocated to
  328. ttys. It also allows a style of job-control programming somewhat
  329. different from the usual BSD style. However, settpgrp() and tctpgrp()
  330. can be implemented as library routines under BSD. Here they are:
  331.  
  332.    int settpgrp(fdtty)
  333.    int fdtty;
  334.    {
  335.     int pgrp = 0;
  336.     if (fdtty != -1)
  337.       if (ioctl(fdtty,TIOCGPGRP,&pgrp) == -1)
  338.         return -1;
  339.     return setpgrp(0,pgrp);
  340.    }
  341.  
  342.    int tctpgrp(fdtty,pid)
  343.    int fdtty;
  344.    int pid;
  345.    {
  346.     int pgrp;
  347.     if ((pgrp = getpgrp(pid)) == -1)
  348.       return -1;
  349.     return ioctl(fdtty,TIOCSPGRP,&pgrp);
  350.    }
  351.  
  352. Note that this interface doesn't interact with controlling ttys in any
  353. way. Unfortunately, controlling ttys sometimes force their own
  354. interactions, and a job control application which manipulates ttys (as
  355. opposed to a shell, which merely runs under a single tty) should still
  356. be aware of the old controlling tty rules. The same is true in far
  357. greater measure under POSIX---you simply cannot ignore sessions, because
  358. you will open up rather large security holes if you leave all processes
  359. in the same session. Put simply, the POSIX standard forces system code
  360. to manipulate sessions for its health.
  361.  
  362.  
  363. 9. Programming common operations with the new job control interface
  364.  
  365. Forking a pipeline in a job-control shell: The shell starts with
  366. tcnewpgrp(fdtty), so that the tty is in the new process group before
  367. there are even any children. (That's the basic difference between the
  368. BSD and POSIX models and this one.) It then forks each process in the
  369. pipeline. Each process does settpgrp(fdtty), thus joining the new
  370. process group, before it exec()s the appropriate program. Note that to
  371. avoid races the shell should block SIGCHLD while it's spawning children.
  372.  
  373. Handling a stopped child process: When the shell sees that a pipeline
  374. has stopped or exited, it does tctpgrp(fdtty,getpid()) to set the tty to
  375. its own process group. Note that it has to ignore SIGTTOU during this
  376. operation. To resume the pipeline it does tctpgrp(fdtty,pid) where pid
  377. is any one of the child processes, then sends SIGCONT to the process
  378. group.
  379.  
  380. Starting a process under a new tty: When, for instance, telnetd or
  381. init/getty or another program in process group 0 wants to grab a tty, it
  382. opens the tty and forks a child process. The child does tcnewpgrp(fdtty)
  383. to give the tty a real process group, then settpgrp(fdtty) to place
  384. itself into the foreground.
  385.  
  386. Changing ttys: Despite what POSIX would have you believe with its
  387. session straitjacket rules, people do run programs all the time under a
  388. different tty from the shell. The most common example in BSD is probably
  389. the script program; other examples are emacs, screen, pty, mtty, atty.
  390. Fortunately, exactly the same procedure works as in the previous
  391. example.
  392.  
  393. Dissociating a daemon: Note that dissociating from a tty is a
  394. controlling-terminal concept. However, most daemons do want to place
  395. themselves into process groups of their own, so that they are not
  396. affected by job-control signals. This can be handled in several ways,
  397. but by far the easiest is settpgrp(-1) to join process group 0. (Note
  398. that under BSD there is no reliable way to dissociate from a controlling
  399. tty---the TIOCEXCL ioctl can prevent dissociation. That is not the mark
  400. of a clean interface.)
  401.  
  402. Forcing oneself into the foreground: Most programs which manipulate the
  403. tty, usually so that they can run in character mode, don't work
  404. correctly with job control. The usual sequence after startup is this:
  405. read tty modes; write new tty modes including noecho and cbreak. The
  406. problem is that the process could be in the background when it reads the
  407. tty modes---a different program, which itself changes the tty modes to
  408. something strange, could be in the foreground. This process will read
  409. the strange modes, then stop when it tries to set the modes. Later it is
  410. restarted and runs without trouble---but when it exits, it will
  411. ``restore'' the tty to those strange modes it started with. To avoid
  412. this bug, processes which manipulate the tty should force themselves
  413. into the foreground before reading or writing anything. An easy way to
  414. do this is tctpgrp(getpid()), with the default SIGTTOU handler. Note
  415. that the program should also do this upon continuing after a stop---
  416. otherwise it might make the same mistake of reading modes before it
  417. knows it's in the foreground.
  418.  
  419.  
  420. 10. Helpful extensions to the job control system
  421.  
  422. There are several steps you can take which don't extend the job control
  423. interface but which do make job control programs more portable or easier
  424. to read.
  425.  
  426. As noted above, BSD has a wait3() call instead of wait2(). It is called
  427. as follows:
  428.  
  429.   #include <sys/wait.h>
  430.   #include <sys/time.h>
  431.   #include <sys/resource.h>
  432.  
  433.   int wait3(status,options,rusage)
  434.   int *status;
  435.   int options;
  436.   struct rusage *rusage;
  437.  
  438. If rusage is NULL, this is just like wait2(). <sys/time.h> can simply
  439. #include <time.h>. (Under BSD it defines several system time structures,
  440. like struct timeval.) <sys/resource.h> doesn't need to provide any
  441. information other than a definition of struct rusage. (Under BSD, if a
  442. child exits and the parent provides a non-NULL rusage pointer to
  443. wait3(), the structure is filled in with information about the resources
  444. used by the child [and its children, and so on]. For instance,
  445. ru_nsignals is the number of signals received. This is very open-ended
  446. and absolutely irrelevant to job control.) If you are adding job control
  447. to a system without it and want to provide the wait3() call, just define
  448. struct rusage { int dummy; }. While a job-control shell can make good
  449. use of resource information, most uses of wait3() really don't need the
  450. third argument. However, there are enough programs which include
  451. <sys/time.h> and <sys/resource.h> and use wait3() that it is worthwhile
  452. to provide the extra interface.
  453.  
  454. Another extension is to define a ``union wait'' type in <sys/wait.h>
  455. with an ``int w_status'' member. At some point BSD left the beaten path
  456. and decided that wait() should use a union wait instead of an int to
  457. return status information. This decision is generally regarded as a
  458. mistake if only because it severely hampers portability, but there are
  459. quite a few programs which depend on it, and there's no harm in
  460. supporting it.
  461.  
  462. More useful is to define a set of macros which extract information from
  463. a wait status. (Under BSD, union wait actually contains structure
  464. members which encode the same information. However, the macros are
  465. easier to use and support.) Here are the important ones:
  466.  
  467.    #define WIFSTOPPED(s) (((s) & 0177) == 0177)
  468.    #define WIFEXITED(s) (!((s) & 0177))
  469.    #define WIFSIGNALED(s) (0176 > (unsigned) (((s) & 0177) - 1))
  470.    #define WSTOPSIG(s) ((s) >> 8) /* only defined if WIFSTOPPED */
  471.    #define WEXITSTATUS(s) ((s) >> 8) /* only defined if WIFEXITED */
  472.    #define WTERMSIG(s) ((s) & 0177) /* only defined if WIFSIGNALED */
  473.    #define WCOREDUMP(s) ((s) & 0200) /* only defined if WIFSIGNALED */
  474.  
  475. On some 16-bit machines the >> 8 may have to be changed, or (s) may have
  476. to be cast to unsigned. These macros are meant to be applied to an int,
  477. not a union wait; most compilers will do the right thing anyway, but be
  478. careful.
  479.  
  480.  
  481. Acknowledgments
  482.  
  483. Thanks to Chris Torek, Christos S. Zoulas, and David J. MacKenzie for
  484. their comments. Thanks also to John F. Haugh for a series of questions
  485. which pointed out that, somewhere in this paper, I should emphasize that
  486. an ``unused'' process group is one which doesn't appear in any t_pgrp or
  487. p_pgrp. (There, I said it.)
  488.  
  489.  
  490. References
  491.  
  492. [1] D. J. Bernstein, ``A new, secure, extremely simple job control
  493. interface,'' article <18072.Jul1707.06.4191@kramden.acf.nyu.edu>,
  494. comp.unix.wizards, July 1991.
  495.