Index: lib/libc/stdlib/ptsname.3 =================================================================== --- lib/libc/stdlib/ptsname.3 +++ lib/libc/stdlib/ptsname.3 @@ -104,7 +104,20 @@ for the master device specified with .Fa fildes . .Sh RETURN VALUES -.Rv -std grantpt ptsname_r unlockpt +.Rv -std grantpt unlockpt +.Pp +The +.Fn ptsname_r +function returns the value 0 if successful; +otherwise a nonzero value is returned and the global variable +.Va errno +is set to indicate the error. +Note: +.Fn ptsname_r +was previously documented as returning -1 on error. +In the future it will be changed to return an error number, for POSIX +compatibility. +Therefore, callers should not check for -1. .Pp The .Fn ptsname