From 5d5c4c8bb7244fbd289695a1c4320e6e81c5653e Mon Sep 17 00:00:00 2001 From: jsg Date: Tue, 2 Aug 2022 01:23:23 +0000 Subject: [PATCH] access(2) alarm(2) pause(2) were not ported from pwb to v7 Alan Glasser describes the incident that led to access(2) in https://minnie.tuhs.org/pipermail/tuhs/2021-November/024657.html access(2) alarm(2) pause(2) were also part of the "50 changes" tape post v6 "50 bugs" / "diff tape" / "50 fixes" tape (Salus QCU, pp 138-139) "fifty changes" tape https://www.oreilly.com/openbook/opensources/book/kirkmck.html "50 changes" https://archive.org/details/unix_news_november-1976 tuhs/Applications/Spencer_Tapes/unsw3.tar.gz usr/sys/v6unix/changenotes 45) The "access()" system call checks access permissions on the real id's of the process regardless of the effective ones. Doesn't return stats, just does an internal "access()" to set u.u_error. 48) "alarm()" and "pause()" system calls are in to provide a user-mode timeout capability. with and ok schwarze@ --- lib/libc/gen/alarm.3 | 12 +++++++----- lib/libc/gen/pause.3 | 12 +++++++----- lib/libc/sys/access.2 | 19 ++++++++++--------- 3 files changed, 24 insertions(+), 19 deletions(-) diff --git a/lib/libc/gen/alarm.3 b/lib/libc/gen/alarm.3 index 0b06b46d1f0..b4aa10bf8ec 100644 --- a/lib/libc/gen/alarm.3 +++ b/lib/libc/gen/alarm.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: alarm.3,v 1.16 2021/06/18 22:21:29 cheloha Exp $ +.\" $OpenBSD: alarm.3,v 1.17 2022/08/02 01:23:23 jsg Exp $ .\" .\" Copyright (c) 1980, 1991, 1993, 1994 .\" The Regents of the University of California. All rights reserved. @@ -27,7 +27,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd $Mdocdate: June 18 2021 $ +.Dd $Mdocdate: August 2 2022 $ .Dt ALARM 3 .Os .Sh NAME @@ -84,9 +84,11 @@ function conforms to .Sh HISTORY An .Fn alarm -system call appeared in the Programmer's Workbench (PWB/UNIX) -and was ported to -.At v7 . +system call first appeared outside of Bell Labs in the +.Dq 50 changes +tape for +.At v6 . +It was first officially released with PWB/UNIX 1.0. For .Bx 4.1c , it was reimplemented as a wrapper around the diff --git a/lib/libc/gen/pause.3 b/lib/libc/gen/pause.3 index 97959017427..47ec9324226 100644 --- a/lib/libc/gen/pause.3 +++ b/lib/libc/gen/pause.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: pause.3,v 1.14 2015/09/23 08:52:56 sobrado Exp $ +.\" $OpenBSD: pause.3,v 1.15 2022/08/02 01:23:23 jsg Exp $ .\" .\" Copyright (c) 1980, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -27,7 +27,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd $Mdocdate: September 23 2015 $ +.Dd $Mdocdate: August 2 2022 $ .Dt PAUSE 3 .Os .Sh NAME @@ -76,9 +76,11 @@ The call was interrupted. .Sh HISTORY A .Fn pause -system call first appeared in the Programmer's Workbench (PWB/UNIX) -and was then ported to -.At v7 . +system call first appeared outside of Bell Labs in the +.Dq 50 changes +tape for +.At v6 . +It was first officially released with PWB/UNIX 1.0. It was reimplemented as a wrapper around the .Fn sigpause and diff --git a/lib/libc/sys/access.2 b/lib/libc/sys/access.2 index 38b7ef39683..cb58305ca9f 100644 --- a/lib/libc/sys/access.2 +++ b/lib/libc/sys/access.2 @@ -1,4 +1,4 @@ -.\" $OpenBSD: access.2,v 1.25 2015/01/19 15:54:11 millert Exp $ +.\" $OpenBSD: access.2,v 1.26 2022/08/02 01:23:23 jsg Exp $ .\" $NetBSD: access.2,v 1.7 1995/02/27 12:31:44 cgd Exp $ .\" .\" Copyright (c) 1980, 1991, 1993 @@ -30,7 +30,7 @@ .\" .\" @(#)access.2 8.2 (Berkeley) 4/1/94 .\" -.Dd $Mdocdate: January 19 2015 $ +.Dd $Mdocdate: August 2 2022 $ .Dt ACCESS 2 .Os .Sh NAME @@ -218,13 +218,14 @@ functions conform to .Sh HISTORY .Fn access first appeared as an internal kernel function in -.At v1 -and was reimplemented in C before the release of -.At v4 . -It was first promoted to a system call in the Programmer's Workbench -(PWB/UNIX), which was later ported to -.At v7 -and +.At v1 . +It became a system call, +first appearing outside of Bell Labs in the +.Dq 50 changes +tape for +.At v6 . +The first official release with the system call was PWB/UNIX 1.0. +It was also included in .Bx 2 . .Pp The -- 2.20.1