Re: [PATCH] Cygwin: ptsname_r: always return an error number on failure

2021-01-22 Thread Corinna Vinschen via Cygwin-patches
On Jan 21 17:48, Ken Brown via Cygwin-patches wrote: > On 1/20/2021 1:00 PM, Ken Brown via Cygwin-patches wrote: > > Following Linux, return ENOTTY on a bad file descriptor and also set > > errno to ENOTTY. > > > > Previously 0 was returned and errno was set to EBADF. Returning 0 > > violates the

Re: [PATCH] Cygwin: ptsname_r: always return an error number on failure

2021-01-21 Thread Ken Brown via Cygwin-patches
On 1/20/2021 1:00 PM, Ken Brown via Cygwin-patches wrote: Following Linux, return ENOTTY on a bad file descriptor and also set errno to ENOTTY. Previously 0 was returned and errno was set to EBADF. Returning 0 violates the requirement in https://man7.org/linux/man-pages/man3/ptsname_r.3.html th

[PATCH] Cygwin: ptsname_r: always return an error number on failure

2021-01-20 Thread Ken Brown via Cygwin-patches
Following Linux, return ENOTTY on a bad file descriptor and also set errno to ENOTTY. Previously 0 was returned and errno was set to EBADF. Returning 0 violates the requirement in https://man7.org/linux/man-pages/man3/ptsname_r.3.html that an error number should be returned on failure. (That man