Subject: #242 missing a file (#244)
Index:	lib/libc/pdp/sys/vfork.s 2.11BSD

Description:
	The change to vfork.s was accidentally left out of the
	libc.pdp.sys.patch file from #243.

Repeat-By:
	Link a program which uses vfork(2).  The symbol _par_uid will
	be undefined.  This global was removed (not used by anything)
	from fork.s.

Fix:
	Apply the patch below.  If you do this before remaking libc.a
	the change will take effect when you remake libc.a.

	If you wish to just update vfork.o in libc.a:

		cd /usr/src/lib/libc/pdp/sys
		make
		# then when vfork.o and profiled/vfork.o have been assembled
		# hit a ^C
		ar rv /lib/libc.a vfork.o
		cd profiled
		ar rv /usr/lib/libc_p.a vfork.o
		ranlib /lib/libc.a /usr/lib/libc_p.a
		cd ..
		make clean

====================cut here================
*** /usr/src/lib/libc/pdp/sys/vfork.s.old	Thu Jan 29 05:52:48 1987
--- /usr/src/lib/libc/pdp/sys/vfork.s	Sat May 13 22:34:07 1995
***************
*** 5,11 ****
   */
  
  #ifdef SYSLIBC_SCCS
! _sccsid: <@(#)vfork.s	2.5 (Berkeley) 1/29/87\0>
  	.even
  #endif SYSLIBC_SCCS
  
--- 5,11 ----
   */
  
  #ifdef SYSLIBC_SCCS
! _sccsid: <@(#)vfork.s	2.6 (2.11BSD) 1995/05/13\0>
  	.even
  #endif SYSLIBC_SCCS
  
***************
*** 14,27 ****
   *
   * pid = vfork();
   *
!  * pid == 0 in child process; pid == -1 means error return in child, parents
!  * id is in par_uid if needed.  Since the parent and child share the stack,
!  * the return address for the parent would be overwritten by the child.
!  * Therefore, save the return address in r1 and "return" by a jump indirect.
   */
  #include "SYS.h"
  
! .globl	_par_uid, __ovno
  
  .bss
  savov:	.=.+2
--- 14,27 ----
   *
   * pid = vfork();
   *
!  * pid == 0 in child process; pid == -1 means error return in child.
!  * Since the parent and child share the stack, the return address for the 
!  * parent would be overwritten by the child.  Therefore, save the return 
!  * address in r1 and "return" by a jump indirect.
   */
  #include "SYS.h"
  
! .globl	__ovno
  
  .bss
  savov:	.=.+2
***************
*** 32,43 ****
  	mov	__ovno,savov	/ save __ovno for parent
  	SYS(vfork)		/ (takes no parameters)
  	br	1f		/ child returns here
! 	bes	2f		/ parent returns here
  	mov	savov,__ovno	/ restore ovno in case child switched
  	jmp	(r1)		/ "return" to saved location
- 
  1:
- 	mov	r0,_par_uid	/ (in case no vfork syscall)
  	clr	r0
  	jmp	(r1)
  2:
--- 32,41 ----
  	mov	__ovno,savov	/ save __ovno for parent
  	SYS(vfork)		/ (takes no parameters)
  	br	1f		/ child returns here
! 	bcs	2f		/ parent returns here
  	mov	savov,__ovno	/ restore ovno in case child switched
  	jmp	(r1)		/ "return" to saved location
  1:
  	clr	r0
  	jmp	(r1)
  2:
*** /VERSION.old	Sat May 13 22:05:47 1995
--- /VERSION	Sat May 13 22:38:14 1995
***************
*** 1,4 ****
! Current Patch Level: 243
  
  2.11 BSD
  ============
--- 1,4 ----
! Current Patch Level: 244
  
  2.11 BSD
  ============
