From 1060c75faa8727deaf6e8bd0789c902f016c2798 Mon Sep 17 00:00:00 2001 From: yamt Date: Sat, 10 Aug 2002 17:14:50 +0000 Subject: [PATCH] result of getenv should be treated as read-only. from OpenBSD. --- lib/libc/stdlib/getenv.3 | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/libc/stdlib/getenv.3 b/lib/libc/stdlib/getenv.3 index 80e3cd4f9eeb..393e30b5f9cd 100644 --- a/lib/libc/stdlib/getenv.3 +++ b/lib/libc/stdlib/getenv.3 @@ -1,4 +1,4 @@ -.\" $NetBSD: getenv.3,v 1.12 2002/02/07 07:00:28 ross Exp $ +.\" $NetBSD: getenv.3,v 1.13 2002/08/10 17:14:50 yamt Exp $ .\" .\" Copyright (c) 1988, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -37,7 +37,7 @@ .\" .\" from: @(#)getenv.3 8.2 (Berkeley) 12/11/93 .\" -.Dd December 11, 1993 +.Dd August 11, 2002 .Dt GETENV 3 .Os .Sh NAME @@ -123,6 +123,10 @@ return zero if successful; otherwise the global variable .Va errno is set to indicate the error and a \-1 is returned. +.Pp +If +.Fn getenv +is successful, the string returned should be considered read-only. .Sh ERRORS .Bl -tag -width Er .It Bq Er ENOMEM