[PATCH] grantpt errno values

Ulrich Drepper drepper@redhat.com
Mon Dec 10 23:06:00 GMT 2001


Thorsten Kukuk <kukuk@suse.de> writes:

> --- sysdeps/unix/sysv/linux/ptsname.c
> +++ sysdeps/unix/sysv/linux/ptsname.c	2001/12/10 09:31:15
> @@ -85,8 +85,7 @@
>  
>    if (!__isatty (fd))
>      {
> -      __set_errno (ENOTTY);
> -      return ENOTTY;
> +      return errno;
>      }

That this change works for you is only a side effect of the current
implementation of isatty().  This functions isn't required to set
errno to a specific value.

In which case did you see a wrong errno value?  This must be
discovered differently.

-- 
---------------.                          ,-.   1325 Chesapeake Terrace
Ulrich Drepper  \    ,-------------------'   \  Sunnyvale, CA 94089 USA
Red Hat          `--' drepper at redhat.com   `------------------------



More information about the Libc-hacker mailing list