[comp.os.minix] Patches to fix control terminals

bishop@ecsvax.UUCP (Alan Bishop) (10/25/87)

Here are patches to remove the assumptions that MINIX makes about where a
control terminal for a process is.  It also fixes the assumptions in the
terminal driver about where to send signals.

This incorporates the patches that I posted a while ago that added
setpgrp() and getpgrp() to MINIX.

I'd love to hear about bugs.  In particular, if you install this on a
system that has multiple terminals, please let me know how it works.
I've had no problems with it on my single terminal system.

There is a README file in the shell archive that goes into more detail.

alan

------slice here------
#! /bin/sh
# This is a shell archive, meaning:
# 1. Remove everything above the #! /bin/sh line.
# 2. Save the resulting text in a file.
# 3. Execute the file with /bin/sh (not csh) to create the files:
#	Dirlist
#	README
#	fs:const.diff
#	fs:device.diff
#	fs:fproc.diff
#	fs:misc.diff
#	fs:open.diff
#	fs:param.diff
#	fs:table.diff
#	h:callnr.diff
#	h:com.diff
#	kernel:tty.dif
#	lib:getpgrp.c
#	lib:syslib.dif
#	mm:forkexit.di
#	mm:getset.diff
#	mm:signal.diff
#	mm:table.diff
# This archive created: Sun Oct 25 00:49:02 1987
export PATH; PATH=/bin:$PATH
if test -f 'Dirlist'
then
	echo shar: will not over-write existing file "'Dirlist'"
else
sed 's/^X//' << \SHAR_EOF > 'Dirlist'
Xtotal 24
X-rw-r--r--  1   root       0 Oct 24 23:59 Dirlist
X-rw-r--r--  1   root    3043 Oct 24 23:59 README
X-rw-r--r--  1   root     652 Oct 24 23:27 fs:const.diff
X-rw-r--r--  1   root    3774 Oct 24 17:02 fs:device.diff
X-rw-r--r--  1   root     169 Oct 24 23:23 fs:fproc.diff
X-rw-r--r--  1   root    1473 Oct 24 17:02 fs:misc.diff
X-rw-r--r--  1   root     245 Oct 24 17:02 fs:open.diff
X-rw-r--r--  1   root     238 Oct 24 23:23 fs:param.diff
X-rw-r--r--  1   root     551 Oct 24 17:03 fs:table.diff
X-rw-r--r--  1   root     452 Oct 24 23:30 h:callnr.diff
X-rw-r--r--  1   root     224 Oct 24 23:30 h:com.diff
X-rw-r--r--  1   root    1728 Oct 24 17:00 kernel:tty.dif
X-rw-r--r--  1   root     213 Oct 24 17:06 lib:getpgrp.c
X-rw-r--r--  1   root     254 Oct 24 23:20 lib:syslib.dif
X-rw-r--r--  1   root     951 Oct 24 17:04 mm:forkexit.di
X-rw-r--r--  1   root     736 Oct 24 17:04 mm:getset.diff
X-rw-r--r--  1   root     450 Oct 24 17:04 mm:signal.diff
X-rw-r--r--  1   root     242 Oct 24 17:05 mm:table.diff
SHAR_EOF
fi # end of overwriting check
if test -f 'README'
then
	echo shar: will not over-write existing file "'README'"
else
sed 's/^X//' << \SHAR_EOF > 'README'
XHere are patches that deal with the following topics:
X
X1) setpgrp() and getpgrp() have been added.  (They were so trivial compared
X	to the rest of the stuff that it seemed a shame not to add them.)
X2) Process groups are now assigned based on the PID of the process
X	group leader.
X3) The terminal driver no longer makes assumptions about what process
X	to send signals to.
X4) The file system no longer makes assumptions about what a processes'
X	control terminal is.
X5) Redirection to /dev/tty does not hang the system if a process has
X	no control terminal.  (Previously, it was impossible for
X	a process to not have a control terminal.)
X
XAll these are relative to plain 1.2.  This is not a major problem for
Xthose who have added all the upgrades, as they seem to mainly affect
Xthings elsewhere in the sources.
XMost of the patches are short and could easily be applied by hand.
X
XIn addition, this already includes some of the posted patches to
Xmm:signal.c.
X
XIf you have trouble applying the patches, please let me know.
XIf you find bugs, please let me know.  In particular, those of
Xyou running more than one terminal should watch for anything
Xpeculiar, since I am only running with the console (and therefore
Xhaven't tested it on a multi-terminal system.)
X
X------------
X
XThe rest of this describes exactly what the patch does internally.
X
X1) When a process opens a terminal device, a check is made to
X	see if the process has a control terminal, if any other
X	process has that terminal as a control terminal,
X	and if the process is a process group leader.  If all of
X	these conditions are met, then a the terminal becomes
X	a control terminal for the process.
X2) The slot number of the process is sent to the terminal
X	driver.
X3) If a process changes it's process group, the memory manager
X	propages this to the file system.  The terminal driver
X	does not need to know.  (Since it is impossible for the
X	process group leader to change it's process group to anything
X	other than its PID.)
X4) When a process exits, the file system checks to see if
X	it was a process group leader and had a control terminal.
X	If this is true, then it changes all processes who had
X	that terminal as a control terminal to have no control
X	terminal.  However, they still can read and write to the
X	terminal (unlike BSD.  This could be changed without too
X	much trouble, I think.  However, I haven't really looked
X	into it.)
X
XThere were many minor changes to several parts of the system.  However,
XI think all the changes are fairly consistant with the rest of the system
Xexcept for one thing.  In fs:device.c, the find_dev routine now returns
Xthe full device number instead of just the minor byte.  This allows
Xthe dev_open routines to have the full device, allowing for multiple
Xdevice drivers for terminals.  do_ioctl had to be changed, but all
Xthe other routines ALREADY masked off the major byte if needed.
X
XIf you have any questions, bug reports, or have a suggestion as to
Xhow this could have done better, please let me know.
X
Xalan (bishop@ecsvax.{UUCP,BITNET})
X
SHAR_EOF
fi # end of overwriting check
if test -f 'fs:const.diff'
then
	echo shar: will not over-write existing file "'fs:const.diff'"
else
sed 's/^X//' << \SHAR_EOF > 'fs:const.diff'
X1,4c1,8
X< /* Tables sizes */
X< #define NR_ZONE_NUMS       9	/* # zone numbers in an inode */
X< #define NR_BUFS           20	/* # blocks in the buffer cache */
X< #define NR_BUF_HASH       32	/* size of buf hash table; MUST BE POWER OF 2*/
X---
X> /* MINIX 1.2 const.h */
X> /* Added NULL_DEVNR which points to the null device 09/18/87 AGB */
X> /* */
X> 
X> /* Tables sizes */
X> #define NR_ZONE_NUMS       9	/* # zone numbers in an inode */
X> #define NR_BUFS           20	/* # blocks in the buffer cache */
X> #define NR_BUF_HASH       32	/* size of buf hash table; MUST BE POWER OF 2*/
X20a25
X> #define NULL_DEVNR (dev_nr) 0x103/* points to the null device */
SHAR_EOF
fi # end of overwriting check
if test -f 'fs:device.diff'
then
	echo shar: will not over-write existing file "'fs:device.diff'"
else
sed 's/^X//' << \SHAR_EOF > 'fs:device.diff'
X0a1,10
X> /* MINIX 1.2 device.c */
X> /* If /dev/tty points to a non-existant device, point it to
X> 	/dev/null 09/18/87 AGB */
X> /* find_dev returns the full dev_nr in dev_mess.DEVICE instead
X> 	of just the minor byte.  do_ioctl fixed to kill the major
X> 	byte before calling rw_dev.  This does not affect dev_io.
X> 	However, dev_open and dev_close routines will have the
X> 	FULL dev_nr number when calling.  09/18/87 AGB */
X> /* cntltty.c appended 10/03/87 AGB */
X> 
X113a124
X>   dev_mess.DEVICE = (dev_mess.DEVICE >> MINOR) & BYTE; 
X138c149
X<   dev_mess.DEVICE = minor;
X---
X>   dev_mess.DEVICE = dev;
X181,184c192,199
X< 
X<   major_device = (fp->fs_tty >> MAJOR) & BYTE;
X<   task_nr = dmap[major_device].dmap_task;	/* task for controlling tty */
X<   mess_ptr->DEVICE = (fp->fs_tty >> MINOR) & BYTE;
X---
X>   dev_nr redirdev;
X> 
X>   redirdev = fp->fs_tty;
X>   if (redirdev == (dev_nr) 0) redirdev = NULL_DEVNR;
X> 
X>   major_device = (redirdev >> MAJOR) & BYTE;
X>   task_nr = dmap[major_device].dmap_task;	/* task for controlling tty */
X>   mess_ptr->DEVICE = (redirdev >> MINOR) & BYTE;
X199a215,309
X> 
X> /*----------------------------------*/
X> /* for use with MINIX 1.2 cntltty.c */
X> /* First version: 09/17/87 AGB */
X> 
X> /* When a tty is opened or a process exits, control terminals may
X>  * change.  These routines manage all control terminal stuff.
X>  *
X>  * The entry points in this file are:
X>  *   tty_open:  a tty has been opened
X>  *   tty_exit:  a process with pid=pgrp has exited.
X>  */
X> /*
X> #include "../h/const.h"
X> #include "../h/type.h"
X> #include "../h/com.h"
X> #include "../h/error.h"
X> #include "const.h"
X> #include "type.h"
X> #include "fproc.h"
X> #include "glo.h"
X> #include "param.h"
X>  */
X> 
X> /*===========================================================================*
X>  *				tty_open				     *
X>  *===========================================================================*/
X> PUBLIC int tty_open(task, opmess)
X> int task;
X> struct message *opmess;
X> 
X> {
X>    register struct fproc *cfp;
X>    int allocated = FALSE;
X> 
X> /* Is this a process group leader?  Is there a current control terminal? */
X>    if (fp->fp_pid != fp->fp_procgrp || fp->fs_tty != (dev_nr) 0) return(OK);
X> 
X> /* Is this one already allocated to another process? */
X>    for (cfp = &fproc[INIT_PROC_NR + 1]; cfp < &fproc[NR_PROCS]; cfp++) {
X> 	if (cfp->fs_tty == opmess->DEVICE) {
X> 		allocated = TRUE;
X> 		break;
X> 	}
X>    }
X>    if (allocated) return(OK);
X> 
X> /* All conditions satisfied.  Make this a control terminal. */
X> 
X>    fp->fs_tty = opmess->DEVICE;
X> 
X> /* Inform the terminal driver */
X> 
X>    dev_mess.DEVICE = (dev_mess.DEVICE >> MINOR) & BYTE;
X>    dev_mess.m_type = TTY_SETPGRP;
X>    dev_mess.PROC_NR = who;
X>    dev_mess.TTY_CNTLSLOT = who;
X> 
X>    (*dmap[major].dmap_rw)(task, &dev_mess);
X> 
X>    return(OK);
X> }
X> 
X> /*===========================================================================*
X>  *				tty_exit				     *
X>  *===========================================================================*/
X> PUBLIC int tty_exit()
X> 
X> {
X>    register struct fproc *cfp;
X>    register dev_nr ttydev;
X> 
X>    ttydev = fp->fs_tty;
X> 
X> /* Is a control terminal being deallocated? */
X>    if (fp->fp_pid != fp->fp_procgrp || ttydev == (dev_nr) 0) return(OK);
X> 
X> /* Yes.  Remove it from any processes currently running. */
X>    for (cfp = &fproc[INIT_PROC_NR + 1]; cfp < &fproc[NR_PROCS]; cfp++) {
X> 	if (cfp->fs_tty == ttydev) cfp->fs_tty = (dev_nr) 0;
X>    }
X> 
X> /* Inform the terminal driver. */
X> 
X>    find_dev(ttydev);
X> 
X>    dev_mess.DEVICE = (dev_mess.DEVICE >> MINOR) & BYTE;
X>    dev_mess.m_type = TTY_SETPGRP;
X>    dev_mess.PROC_NR = who;
X>    dev_mess.TTY_CNTLSLOT = 0;
X> 
X>    (*dmap[major].dmap_rw)(task, &dev_mess);
X> 
X>    return(OK);
X> }
SHAR_EOF
fi # end of overwriting check
if test -f 'fs:fproc.diff'
then
	echo shar: will not over-write existing file "'fs:fproc.diff'"
else
sed 's/^X//' << \SHAR_EOF > 'fs:fproc.diff'
X0a1,3
X> /* MINIX 1.2 fproc.h */
X> /* fp_pid and fp_procgrp added 09/08/87 AGB */
X> 
X21a25,26
X>   int fp_pid;			/* process id */
X>   int fp_procgrp;		/* process group */
SHAR_EOF
fi # end of overwriting check
if test -f 'fs:misc.diff'
then
	echo shar: will not over-write existing file "'fs:misc.diff'"
else
sed 's/^X//' << \SHAR_EOF > 'fs:misc.diff'
X0a1,5
X> /* MINIX 1.2 misc.c */
X> /* Added support for SETPGRP and mods to fork 09/08/87 AGB */
X> /* SETPGRP can change a control terminal 09/17/87 AGB */
X> /* Check to see if a procgrp leader is exiting 09/17/87 AGB */
X> 
X11a17
X>  *   do_setpgrp:set a process group equal to the pid
X142,143c148,154
X<   /* Increase the counters in the 'filp' table. */
X<   cp = &fproc[child];
X---
X>   cp = &fproc[child];
X> 
X>   /* Fill in new process id and, if necessary, process group. */
X>   cp->fp_pid = pid;
X>   if (parent == INIT_PROC_NR) cp->fp_procgrp = pid;
X> 
X>   /* Increase the counters in the 'filp' table. */
X169a181,183
X>   /* Can this be a process group leader associated with a terminal? */
X>   if (fp->fp_pid == fp->fp_procgrp && fp->fs_tty != 0) tty_exit();
X> 
X235a250,273
X> 
X> /*===========================================================================*
X>  *				do_setpgrp				     *
X>  *===========================================================================*/
X> PUBLIC int do_setpgrp()
X> {
X> /* A process has changed its process group.  Update the file system table.
X>  * Only the memory manager may make this call.
X>  */
X> 
X>   register struct fproc *chproc;
X> 
X>   if (who != MM_PROC_NR) return(ERROR);
X> 
X>   chproc = &fproc[proc_slot];
X> 
X> /* Don't change the control terminal unless necessary. */
X>   if (chproc->fp_procgrp == chproc->fp_pid) return(OK);
X> 
X>   chproc->fp_procgrp = chproc->fp_pid;
X>   chproc->fs_tty = (dev_nr) 0;
X>   
X>   return(OK);
X> }
SHAR_EOF
fi # end of overwriting check
if test -f 'fs:open.diff'
then
	echo shar: will not over-write existing file "'fs:open.diff'"
else
sed 's/^X//' << \SHAR_EOF > 'fs:open.diff'
X0a1,3
X> /* MINIX 1.2 open.c */
X> /* Removed assumption about control terminals 09/18/87 AGB */
X> 
X213,214d215
X< 	/* Assume that first open of char special file is controlling tty. */
X< 	if (fp->fs_tty == 0) fp->fs_tty = (dev_nr) rip->i_zone[0];
SHAR_EOF
fi # end of overwriting check
if test -f 'fs:param.diff'
then
	echo shar: will not over-write existing file "'fs:param.diff'"
else
sed 's/^X//' << \SHAR_EOF > 'fs:param.diff'
X0a1,3
X> /* MINIX 1.2 param.h */
X> /* Added "pid" to pass a process PID in along with fork 09/08/87 AGB */
X> 
X30c33,35
X< #define pro	      m.m1_i1
X---
X> #define pid	      m.m1_i3
X> #define pro	      m.m1_i1
X> #define proc_slot     m.m1_i1
SHAR_EOF
fi # end of overwriting check
if test -f 'fs:table.diff'
then
	echo shar: will not over-write existing file "'fs:table.diff'"
else
sed 's/^X//' << \SHAR_EOF > 'fs:table.diff'
X0a1,4
X> /* MINIX 1.2 table.c */
X> /* SETPGRP and GETPGRP added 09/08/87 AGB */
X> /* Have tty call tty_open 09/17/87 AGB */
X> 
X30a35
X> extern do_setpgrp();
X105c110,113
X< 	no_sys		/* 68 = TASK_REPLY	*/
X---
X> 	no_sys,		/* 68 = TASK_REPLY	*/
X> 
X> 	do_setpgrp,	/* 69 = setpgrp */
X> 	no_sys		/* 70 = getpgrp */
X109c117
X< extern rw_dev(), rw_dev2();
X---
X> extern rw_dev(), rw_dev2(), tty_open();
X124c132
X<     no_call,   rw_dev,      no_call,    TTY,         /* 4 = /dev/tty0 */
X---
X>     tty_open,  rw_dev,      no_call,    TTY,         /* 4 = /dev/tty0 */
SHAR_EOF
fi # end of overwriting check
if test -f 'h:callnr.diff'
then
	echo shar: will not over-write existing file "'h:callnr.diff'"
else
sed 's/^X//' << \SHAR_EOF > 'h:callnr.diff'
X1c1,4
X< #define NCALLS            69  	/* number of system calls allowed */
X---
X> /* MINIX 1.2 callnr.h */
X> /* GETPGRP and SETPGRP added 09/08/87 AGB */
X> 
X> #define NCALLS            71  	/* number of system calls allowed */
X50a54,60
X> 
X> /* The following are other system calls that are not part of the
X>  * distributed MINIX 1.2.  These numbers might should be something else.
X>  */
X> 
X> #define SETPGRP           69
X> #define GETPGRP           70
SHAR_EOF
fi # end of overwriting check
if test -f 'h:com.diff'
then
	echo shar: will not over-write existing file "'h:com.diff'"
else
sed 's/^X//' << \SHAR_EOF > 'h:com.diff'
X0a1,3
X> /* MINIX 1.2 com.h */
X> /* Added TTY_SETPGRP and TTY_PROCGRP 10/03/87 AGB */
X> 
X47a51
X> #	define TTY_SETPGRP 6	/* fcn code for setpgrp */
X68a73
X> #define TTY_CNTLSLOT   m2_i3    /* message parameter: cntltty slot */
SHAR_EOF
fi # end of overwriting check
if test -f 'kernel:tty.dif'
then
	echo shar: will not over-write existing file "'kernel:tty.dif'"
else
sed 's/^X//' << \SHAR_EOF > 'kernel:tty.dif'
X0a1,3
X> /* MINIX 1.2 tty.c */
X> /* Added control terminal/process group support 10/04/87 AGB */
X> 
X28a32
X>  *   TTY_SETPGRP:  indicate a change in a control terminal
X42a47,48
X>  * |-------------+---------+---------+---------+---------+---------+---------|
X>  * | TTY_SETPGRP |minor dev| proc nr |         |         |         |         |
X133a140
X>   int tty_cntlslot;		/* Slot number of controlling process */
X223,225c230,234
X< 	    case TTY_O_DONE:	/* reserved for future use (RS-232 terminals)*/
X< 	    default:		tty_reply(TASK_REPLY, tty_mess.m_source, 
X< 					tty_mess.PROC_NR, EINVAL, 0L, 0L);
X---
X> 	    case TTY_SETPGRP:   do_setpgrp(tp, &tty_mess);	break;
X> 	    case TTY_O_DONE:	/* reserved for future use (RS-232 terminals)*/
X> 	    default:
X> 				tty_reply(TASK_REPLY, tty_mess.m_source,
X> 				 	tty_mess.PROC_NR, EINVAL, 0L, 0L);
X495,496c504,518
X< 
X< /*===========================================================================*
X---
X> /*====================================================================================================*
X>  *				do_setpgrp					     *
X>  *===========================================================================*/
X> PRIVATE do_setpgrp(tp, m_ptr)
X> register struct tty_struct *tp; /* pointer to tty struct */
X> message *m_ptr;			/* pointer to message sent to the task */
X> {
X> /* A control process group has changed */
X> 
X>    tp->tty_cntlslot = m_ptr->TTY_CNTLSLOT;
X>    tty_reply(TASK_REPLY, m_ptr->m_source, m_ptr->PROC_NR, OK, 0L, 0L);
X> }
X> 
X> 
X> /*====================================================================================================*
X499a522
X> 
X782c805
X<   cause_sig(LOW_USER + 1 + line, sig);
X---
X>   if (tp->tty_cntlslot) cause_sig(tp->tty_cntlslot, sig);
SHAR_EOF
fi # end of overwriting check
if test -f 'lib:getpgrp.c'
then
	echo shar: will not over-write existing file "'lib:getpgrp.c'"
else
sed 's/^X//' << \SHAR_EOF > 'lib:getpgrp.c'
X#include "../include/lib.h"
X
XPUBLIC int getpgrp()
X{
X  return callm1(MM, GETPGRP, 0, 0, 0, NIL_PTR, NIL_PTR, NIL_PTR);
X}
X
XPUBLIC int setpgrp()
X{
X  return callm1(MM, SETPGRP, 0, 0, 0, NIL_PTR, NIL_PTR, NIL_PTR);
X}
X
SHAR_EOF
fi # end of overwriting check
if test -f 'lib:syslib.dif'
then
	echo shar: will not over-write existing file "'lib:syslib.dif'"
else
sed 's/^X//' << \SHAR_EOF > 'lib:syslib.dif'
X0a1,3
X> /* MINIX 1.2 syslib.c */
X> /* Added comments for new FORK and SETPGRP in tell_fs 09/08/87 AGB */
X> 
X125c128
X<  *      tell_fs(FORK, parent, child, 0)
X---
X>  *      tell_fs(FORK, parent, child, pid)
X129a133
X>  *      tell_fs(SETPGRP, proc, 0, 0);
SHAR_EOF
fi # end of overwriting check
if test -f 'mm:forkexit.di'
then
	echo shar: will not over-write existing file "'mm:forkexit.di'"
else
sed 's/^X//' << \SHAR_EOF > 'mm:forkexit.di'
X0a1,4
X> /* MINIX 1.2 forkexit.c */
X> /* Process groups assigned by PID AGB 09/08/87 */
X> /* Check not to reassign process groups AGB 09/16/87 */
X> 
X28d31
X< PRIVATE process_group = 1;		/* next process grp to be assigned */
X83,85d85
X<   /* Set process group. */
X<   if (who == INIT_PROC_NR) rmc->mp_procgrp = process_group++;
X< 
X94a95
X>   /* Don't assign a pid for a process group in use AGB */
X99c100
X< 		if (rmp->mp_pid == next_pid) {
X---
X> 		if (rmp->mp_pid == next_pid || rmp->mp_procgrp == next_pid) {
X106,108c107,112
X<   /* Tell kernel and file system about the (now successful) FORK. */
X<   sys_fork(who, child_nr, rmc->mp_pid);
X<   tell_fs(FORK, who, child_nr, 0);
X---
X>   /* Set process group for INIT only. Others inherit it. */
X>   if (who == INIT_PROC_NR) rmc->mp_procgrp = next_pid;
X> 
X>   /* Tell kernel and file system about the (now successful) FORK. */
X>   sys_fork(who, child_nr, next_pid);
X>   tell_fs(FORK, who, child_nr, next_pid);
SHAR_EOF
fi # end of overwriting check
if test -f 'mm:getset.diff'
then
	echo shar: will not over-write existing file "'mm:getset.diff'"
else
sed 's/^X//' << \SHAR_EOF > 'mm:getset.diff'
X1,3c1,6
X< /* This file handles the 4 system calls that get and set uids and gids.
X<  * It also handles getpid().  The code for each one is so tiny that it hardly
X<  * seemed worthwhile to make each a separate function.
X---
X> /* MINIX 1.2 getset.c */
X> /* Added getpgrp() and setpgrp() calls 09/08/87 AGB */
X> 
X> /* This file handles the 4 system calls that get and set uids and gids,
X>  * getpid(), getpgrp(), and setpgrp().  The code for these is so tiny
X>  * that they have been combined into one function.
X61,64c64,74
X<   }
X< 
X<   return(r);
X< }
X---
X> 	case GETPGRP:
X> 		r = rmp->mp_procgrp;
X> 		break;
X> 	case SETPGRP:
X> 		r = (rmp->mp_procgrp = rmp->mp_pid);
X> 		tell_fs(SETPGRP, who, 0, 0);
X> 		break;
X>   }
X> 
X>   return(r);
X> }
SHAR_EOF
fi # end of overwriting check
if test -f 'mm:signal.diff'
then
	echo shar: will not over-write existing file "'mm:signal.diff'"
else
sed 's/^X//' << \SHAR_EOF > 'mm:signal.diff'
X0a1,4
X> /* MINIX 1.2 signal.c */
X> /* Fixed misleading error returns in check_sig() 09/16/87 AGB */
X> /* Added alarm patch from bal@cs.vu.nl in check_sig() 10/23/87 AGB */
X> 
X170,174c174,179
X< 		rmp->mp_flags &= ~ALARM_ON;
X< 	}
X< 
X< 	if (send_sig == FALSE || rmp->mp_ignore & mask) continue;
X< 	count++;
X---
X> 		if (send_sig) rmp->mp_flags &= ~ALARM_ON;
X> 	}
X> 
X> 	if (send_sig == FALSE) continue;
X> 	count++;
X> 	if (rmp->mp_ignore & mask) continue;
SHAR_EOF
fi # end of overwriting check
if test -f 'mm:table.diff'
then
	echo shar: will not over-write existing file "'mm:table.diff'"
else
sed 's/^X//' << \SHAR_EOF > 'mm:table.diff'
X0a1,3
X> /* MINIX 1.2 table.c */
X> /* SETPGRP and GETPGRP added 09/08/87 AGB */
X> 
X98,99c101,104
X< 	no_sys		/* 68 = TASK_REPLY	*/
X< };
X---
X> 	no_sys,		/* 68 = TASK_REPLY	*/
X> 	do_getset,	/* 69 = SETPGRP */
X> 	do_getset	/* 70 = GETPGRP */
X> };
SHAR_EOF
fi # end of overwriting check
#	End of shell archive
exit 0