From 7853d5d839629d86ff4691f50bb441ef7d002b01 Mon Sep 17 00:00:00 2001 From: Kris Kennaway Date: Sun, 19 Nov 2000 10:30:42 +0000 Subject: [PATCH] Don't suggest people use getpid() to construct temporary filenames; point them to mkstemp() instead. Obtained from: OpenBSD (based on) --- lib/libc/sys/getpid.2 | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/libc/sys/getpid.2 b/lib/libc/sys/getpid.2 index 1d94d8234fa..1eb77410c50 100644 --- a/lib/libc/sys/getpid.2 +++ b/lib/libc/sys/getpid.2 @@ -53,8 +53,12 @@ returns the process ID of the calling process. -The ID is guaranteed to be unique and is -useful for constructing temporary file names. +Though the ID is guaranteed to be unique, it should +.Em NOT +be used for constructing temporary file names, for +security reasons; see +.Xr mkstemp 3 +instead. .Pp .Fn Getppid returns the process ID of the parent