Mail Archives: cygwin/2002/11/06/12:52:23
On Wed, Nov 06, 2002 at 06:10:26PM +0100, Corinna Vinschen wrote:
>
> > - could `chown' be modified to complain if it fails to do the work it
> > was supposed to do? It seems that the exit status is 0, and besides
> > that the script simply does not care about the exit status of chown.
>
> Tricky. The problem (and the reason the script doesn't test the return
> code) is, there are several conditions for having a working chown. It
> must be NT/2K/XP, ntsec must be on, FS must be NTFS. The chown(2) syscall
> returns intentionally always 0 if any of these conditions isn't met.
That behavior seems rather "non-unix-like". If chown(2) fails to work
shouldn't return an error status, and possibly set ERRNO. Then chown(1)
could report a reasonable error message and exit status.
The script could continue to ignore the chown(1) success or failure
at its own peril.
--
Jon H. LaBadie jcyg AT jgcomp DOT com
JG Computing
4455 Province Line Road (609) 252-0159
Princeton, NJ 08540-4322 (609) 683-7220 (fax)
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
- Raw text -