delorie.com/archives/browse.cgi | search |
Date: | Tue, 25 Feb 2003 21:17:13 +0200 |
From: | "Eli Zaretskii" <eliz AT elta DOT co DOT il> |
Sender: | halo1 AT zahav DOT net DOT il |
To: | rich AT phekda DOT freeserve DOT co DOT uk |
Message-Id: | <7263-Tue25Feb2003211713+0200-eliz@elta.co.il> |
X-Mailer: | emacs 21.3.50 (via feedmail 8 I) and Blat ver 1.8.9 |
CC: | djgpp-workers AT delorie DOT com |
In-reply-to: | <3E5B6452.82F4D938@phekda.freeserve.co.uk> (message from Richard |
Dawe on Tue, 25 Feb 2003 12:40:50 +0000) | |
Subject: | Re: Implementation of fchmod [PATCH] |
References: | <Pine DOT SUN DOT 3 DOT 91 DOT 1030206081714 DOT 6656L-100000 AT is> <3E54E663 DOT 5F32DFF7 AT phekda DOT freeserve DOT co DOT uk> <2427-Sat22Feb2003220304+0200-eliz AT is DOT elta DOT co DOT il> <3E5B6452 DOT 82F4D938 AT phekda DOT freeserve DOT co DOT uk> |
Reply-To: | djgpp-workers AT delorie DOT com |
Errors-To: | nobody AT delorie DOT com |
X-Mailing-List: | djgpp-workers AT delorie DOT com |
X-Unsubscribes-To: | listserv AT delorie DOT com |
> Date: Tue, 25 Feb 2003 12:40:50 +0000 > From: Richard Dawe <rich AT phekda DOT freeserve DOT co DOT uk> > > FWIW Linux allows writes to the file, after fchmod'ing to be read-only. The > test program at the end of this mail works fine on Linux. The file is > read-only afterwards. Then there's no problem, I think. Thanks for looking into this. > I thought about returning ENOSYS instead of ENOENT. I think you suggested this > before. But this would be misleading, I think. I take ENOSYS to mean that the > system call is not implemented at all, whereas we've partially implemented it. > So I think ENOENT is right. ENOSYS means the feature is not supported, so I think it's okay. I won't mind to use ENOENT, but please consider what will a user think when presented with "No such file or directory" in response to a function that didn't accept any file name. > But how do we detect that standard handles are piped? Call isatty on the handle; if it returns zero, the handle is redirected.
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |