Subject: wait4 arrives in 2.11BSD (#124 - 1 of 4) Index: lib,sys/ 2.11BSD Description: The wait4 syscall is not present in 2.11BSD. This means that 'waitpid' is also not present. The CGL_RTP kernel configuration option has not been known to work for years. Not too long ago i was informed that even if the 'rtp' capability were made operable it interacted very badly with the networking code. The 'rtp' option has moved from the deprecated to removed catagory. The quota system was needlessly complicated by emulation the p_quota member of the 4.3BSD proc structure. It is not necessary to have _both_ the p_quota (in 2.11 this was emulated with the parallel pxquota array) and u_quota entities. The p_quota emulation was removed with no ill effect. Repeat-By: Either by examination or by attempting to compile/link a program which uses 'wait4' or 'waitpid'. Fix: Apply the 4 parts (this is part 1) of the update kit, remake the kernel, reboot, and then remake the modified parts of libc.a This part (#1) includes a shell script to remove files no longer needed in the system, a diff to modify the kernel config file and a diff to modify the param.c file. This part is primarily preparatory to the real task of adding 'wait4' to the system. A more detailed discussion of 'wait4' is included with parts 2, 3 and 4. The shell script (patch.rm) removes 8 files from the system. These are: 1) the old 'wait', 'wait3', and 'rtp' syscall routines (new versions are supplied later). 2) the old wait.2 and rtp.2 man pages 3) the old system.c and popen.c (new versions are supplied later). 4) the kern_rtp.c module from the kernel The config diff (patch.conf) updates the following files in /sys/conf: config, VAX, GENERIC, Make.nsunix, Make.sunix, Make.sys and Make.unix If the 'VAX' patch does not apply correctly do not worry about it, just go remove the 'CGL_RTP' line. Only the GENERIC (and VAX) configuration files are updated, you will need to update any other kernel config files you have. Just remove the the CGL_RTP line (and possibly the blank line before it). Lastly the param.c diff (patch.param.c) cleans up the quota structure by removing a couple of items which are not needed. Other references to the deleted structure members will be removed in parts 2 thru 4 of this patch kit. You will need to apply the patch.param.c patch to any param.c files that exist in configured kernels on the system. Simply 'cd' to each directory with a configured kernel and do a "patch < /tmp/patch.param.c' (assuming the shar file below was unpacked into /tmp). You may want to backup the files affected before running the 'patch.rm' and applying the patches. ===================================cut 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 (/tmp/foo) and then "cd /tmp" # 3. Execute the file with /bin/sh (not csh) to create: # patch.rm # patch.conf # patch.param.c # This archive created: Wed Mar 17 09:00:36 1993 export PATH; PATH=/bin:/usr/bin:$PATH if test -f 'patch.rm' then echo shar: "will not over-write existing file 'patch.rm'" else sed 's/^X//' << \SHAR_EOF > 'patch.rm' X#! /bin/sh X/bin/rm /usr/src/lib/libc/gen/popen.c X/bin/rm /usr/src/lib/libc/gen/system.c X/bin/rm /usr/src/lib/libc/pdp/compat-2.9/rtp.s X/bin/rm /usr/src/lib/libc/pdp/sys/wait.s X/bin/rm /usr/src/lib/libc/pdp/sys/wait3.s X/bin/rm /usr/src/man/man2/rtp.2 X/bin/rm /usr/src/man/man2/wait.2 X/bin/rm /usr/src/sys/sys/kern_rtp.c SHAR_EOF chmod +x 'patch.rm' fi if test -f 'patch.conf' then echo shar: "will not over-write existing file 'patch.conf'" else sed 's/^X//' << \SHAR_EOF > 'patch.conf' X*** /usr/src/sys/conf/GENERIC.old Sun Jan 3 13:45:32 1993 X--- /usr/src/sys/conf/GENERIC Fri Mar 12 19:00:43 1993 X*************** X*** 254,258 **** X # Note that profiling is not currently working. We don't have any plans on X # fixing it, so this is essentially a non-supported feature. X PROFILE NO # system profiling with KW11P clock X- X- CGL_RTP NO # allow one real time process X--- 254,256 ---- X*** /usr/src/sys/conf/Make.nsunix.old Sat Dec 26 22:26:30 1992 X--- /usr/src/sys/conf/Make.nsunix Fri Mar 12 19:03:53 1993 X*************** X*** 67,74 **** X vm_proc.o vm_sched.o vm_swap.o vm_swp.o vm_text.o xp.o quota_subr.o X OV1= sys_generic.o ufs_syscalls.o X OV2= kern_acct.o kern_exec.o kern_exit.o kern_fork.o kern_resource.o X! OV3= kern_rtp.o kern_time.o sys_process.o ufs_mount.o ufs_subr.o \ X! uipc_syscalls.o X OV4= dkbad.o kern_sig.o mem.o subr_xxx.o trap.o tty_pty.o tty_tty.o X OV5= quota_kern.o quota_ufs.o quota_sys.o ufs_bmap.o \ X sys_pipe.o X--- 67,73 ---- X vm_proc.o vm_sched.o vm_swap.o vm_swp.o vm_text.o xp.o quota_subr.o X OV1= sys_generic.o ufs_syscalls.o X OV2= kern_acct.o kern_exec.o kern_exit.o kern_fork.o kern_resource.o X! OV3= kern_time.o sys_process.o ufs_mount.o ufs_subr.o uipc_syscalls.o X OV4= dkbad.o kern_sig.o mem.o subr_xxx.o trap.o tty_pty.o tty_tty.o X OV5= quota_kern.o quota_ufs.o quota_sys.o ufs_bmap.o \ X sys_pipe.o X*** /usr/src/sys/conf/Make.sunix.old Tue Dec 29 00:44:28 1992 X--- /usr/src/sys/conf/Make.sunix Fri Mar 12 19:03:39 1993 X*************** X*** 54,60 **** X ufs_subr.o vm_sched.o vm_text.o xp.o X OV1= sys_generic.o ufs_syscalls.o mem.o X OV2= kern_acct.o kern_exec.o kern_exit.o kern_fork.o kern_resource.o X! OV3= clock.o cons.o kern_pdp.o kern_rtp.o kern_time.o \ X kern_xxx.o machdep2.o quota_sys.o subr_prf.o sys_process.o \ X syscalls.o ufs_mount.o X OV4= hk.o init_main.o kern_prot.o tty_pty.o quota_kern.o quota_subr.o \ X--- 54,60 ---- X ufs_subr.o vm_sched.o vm_text.o xp.o X OV1= sys_generic.o ufs_syscalls.o mem.o X OV2= kern_acct.o kern_exec.o kern_exit.o kern_fork.o kern_resource.o X! OV3= clock.o cons.o kern_pdp.o kern_time.o \ X kern_xxx.o machdep2.o quota_sys.o subr_prf.o sys_process.o \ X syscalls.o ufs_mount.o X OV4= hk.o init_main.o kern_prot.o tty_pty.o quota_kern.o quota_subr.o \ X*** /usr/src/sys/conf/Make.sys.old Tue Jun 5 10:04:33 1990 X--- /usr/src/sys/conf/Make.sys Fri Mar 12 19:04:22 1993 X*************** X*** 18,24 **** X ${S}/kern_clock.c ${S}/kern_descrip.c ${S}/kern_exec.c \ X ${S}/kern_exit.c ${S}/kern_fork.c ${S}/kern_mman.c \ X ${S}/kern_proc.c ${S}/kern_prot.c ${S}/kern_resource.c \ X! ${S}/kern_rtp.c ${S}/kern_sig.c ${S}/kern_subr.c \ X ${S}/kern_synch.c ${S}/kern_time.c ${S}/kern_xxx.c \ X ${S}/quota_sys.c ${S}/quota_kern.c ${S}/quota_ufs.c \ X ${S}/quota_subr.c ${S}/subr_log.c ${S}/subr_prf.c ${S}/subr_rmap.c \ X--- 18,24 ---- X ${S}/kern_clock.c ${S}/kern_descrip.c ${S}/kern_exec.c \ X ${S}/kern_exit.c ${S}/kern_fork.c ${S}/kern_mman.c \ X ${S}/kern_proc.c ${S}/kern_prot.c ${S}/kern_resource.c \ X! ${S}/kern_sig.c ${S}/kern_subr.c \ X ${S}/kern_synch.c ${S}/kern_time.c ${S}/kern_xxx.c \ X ${S}/quota_sys.c ${S}/quota_kern.c ${S}/quota_ufs.c \ X ${S}/quota_subr.c ${S}/subr_log.c ${S}/subr_prf.c ${S}/subr_rmap.c \ X*************** X*** 33,39 **** X ${S}/vm_sched.c ${S}/vm_swap.c ${S}/vm_swp.c ${S}/vm_text.c X OBJS= init_main.o init_sysent.o kern_acct.o kern_clock.o \ X kern_descrip.o kern_exec.o kern_exit.o kern_fork.o kern_mman.o \ X! kern_proc.o kern_prot.o kern_resource.o kern_rtp.o kern_sig.o \ X kern_subr.o kern_synch.o kern_time.o kern_xxx.o quota_sys.o \ X quota_kern.o quota_ufs.o quota_subr.o subr_log.o subr_prf.o subr_rmap.o \ X subr_xxx.o sys_generic.o sys_inode.o sys_kern.o \ X--- 33,39 ---- X ${S}/vm_sched.c ${S}/vm_swap.c ${S}/vm_swp.c ${S}/vm_text.c X OBJS= init_main.o init_sysent.o kern_acct.o kern_clock.o \ X kern_descrip.o kern_exec.o kern_exit.o kern_fork.o kern_mman.o \ X! kern_proc.o kern_prot.o kern_resource.o kern_sig.o \ X kern_subr.o kern_synch.o kern_time.o kern_xxx.o quota_sys.o \ X quota_kern.o quota_ufs.o quota_subr.o subr_log.o subr_prf.o subr_rmap.o \ X subr_xxx.o sys_generic.o sys_inode.o sys_kern.o \ X*** /usr/src/sys/conf/Make.unix.old Sat Dec 26 17:01:08 1992 X--- /usr/src/sys/conf/Make.unix Fri Mar 12 19:04:35 1993 X*************** X*** 51,57 **** X BASE= br.o clock.o cons.o dh.o dhu.o dhv.o dkbad.o dn.o dr.o dz.o hk.o ht.o \ X init_main.o init_sysent.o kern_acct.o kern_clock.o kern_descrip.o \ X kern_exec.o kern_exit.o kern_fork.o kern_mman.o kern_pdp.o \ X! kern_proc.o kern_prot.o kern_resource.o kern_rtp.o kern_sig.o \ X kern_subr.o kern_synch.o kern_time.o kern_xxx.o lp.o machdep.o \ X machdep2.o mem.o quota_kern.o quota_subr.o quota_sys.o \ X quota_ufs.o ra.o ram.o rk.o rl.o rx.o si.o subr_prf.o subr_rmap.o \ X--- 51,57 ---- X BASE= br.o clock.o cons.o dh.o dhu.o dhv.o dkbad.o dn.o dr.o dz.o hk.o ht.o \ X init_main.o init_sysent.o kern_acct.o kern_clock.o kern_descrip.o \ X kern_exec.o kern_exit.o kern_fork.o kern_mman.o kern_pdp.o \ X! kern_proc.o kern_prot.o kern_resource.o kern_sig.o \ X kern_subr.o kern_synch.o kern_time.o kern_xxx.o lp.o machdep.o \ X machdep2.o mem.o quota_kern.o quota_subr.o quota_sys.o \ X quota_ufs.o ra.o ram.o rk.o rl.o rx.o si.o subr_prf.o subr_rmap.o \ X*** /usr/src/sys/conf/VAX.old Sun Jan 3 13:47:34 1993 X--- /usr/src/sys/conf/VAX Fri Mar 12 19:01:57 1993 X*************** X*** 248,252 **** X # have floating point hardware, the simulator just won't be used. The floating X # point simulator is automatically compiled in if PDP11 (below) is GENERIC. X FPSIM NO # floating point simulator X- X- CGL_RTP YES # allow one real time process X--- 248,250 ---- X*** /usr/src/sys/conf/config.old Sun Jan 3 13:47:58 1993 X--- /usr/src/sys/conf/config Fri Mar 12 19:02:25 1993 X*************** X*** 119,127 **** X if [ $EXTERNALITIMES = YES ]; then X echo "#define EXTERNALITIMES 1" >> $LO X fi X- if [ $CGL_RTP = YES ]; then X- OPTS="$OPTS -DCGL_RTP" X- fi X if [ $UCB_METER = YES ]; then X OPTS="$OPTS -DUCB_METER" X fi X--- 119,124 ---- SHAR_EOF fi if test -f 'patch.param.c' then echo shar: "will not over-write existing file 'patch.param.c'" else sed 's/^X//' << \SHAR_EOF > 'patch.param.c' X*** /usr/src/sys/conf/param.c.old Fri Jan 1 16:07:32 1993 X--- /usr/src/sys/conf/param.c Thu Mar 11 20:03:37 1993 X*************** X*** 3,9 **** X * All rights reserved. The Berkeley software License Agreement X * specifies the terms and conditions for redistribution. X * X! * @(#)param.c 1.1 (2.10BSD Berkeley) 12/1/86 X */ X X #include "../h/param.h" X--- 3,9 ---- X * All rights reserved. The Berkeley software License Agreement X * specifies the terms and conditions for redistribution. X * X! * @(#)param.c 2.0 (2.11BSD GTE) 3/11/93 X */ X X #include "../h/param.h" X*************** X*** 98,106 **** X #ifdef QUOTA X #include "../h/quota.h" X struct BigQ { X- struct quota *pxquota[NPROC]; /* 2.10 equiv of p_quota */ X struct quota xquota[NQUOTA]; /* the quotas themselves */ X! struct dquot *ixdquot[NINODE]; /* 2.10 equiv of i_dquot */ X struct dquot xdquot[NDQUOT]; /* the dquots themselves */ X struct qhash xqhash[NQHASH]; X struct dqhead xdqhash[NDQHASH]; X--- 98,105 ---- X #ifdef QUOTA X #include "../h/quota.h" X struct BigQ { X struct quota xquota[NQUOTA]; /* the quotas themselves */ X! struct dquot *ixdquot[NINODE]; /* 2.11 equiv of i_dquot */ X struct dquot xdquot[NDQUOT]; /* the dquots themselves */ X struct qhash xqhash[NQHASH]; X struct dqhead xdqhash[NDQHASH]; X*************** X*** 110,129 **** X { X extern struct qhash *qhash; X extern struct dqhead *dqhead; X- struct BigQ *bQ = (struct BigQ *)SEG5; X X! QUOTAMAP(); X! quota = bQ->xquota; X! dquot = bQ->xdquot; X! qhash = bQ->xqhash; X! dqhead = bQ->xdqhash; X ndquot = NDQUOT; X nquota = NQUOTA; X! px_quota = bQ->pxquota; X! ix_dquot = bQ->ixdquot; X dquotNDQUOT = &dquot[ndquot]; X quotaNQUOTA = "a[nquota]; X- QUOTAUNMAP(); X } X #endif X X--- 109,124 ---- X { X extern struct qhash *qhash; X extern struct dqhead *dqhead; X X! quota = ((struct BigQ *)SEG5)->xquota; X! dquot = ((struct BigQ *)SEG5)->xdquot; X! qhash = ((struct BigQ *)SEG5)->xqhash; X! dqhead = ((struct BigQ *)SEG5)->xdqhash; X ndquot = NDQUOT; X nquota = NQUOTA; X! ix_dquot = ((struct BigQ *)SEG5)->ixdquot; X dquotNDQUOT = &dquot[ndquot]; X quotaNQUOTA = "a[nquota]; X } X #endif X SHAR_EOF fi exit 0 # End of shell archive