GNU bug report logs - #12494
0 exit status even when chmod fails

Previous Next

Package: coreutils;

Reported by: Georgiy Treyvus <georgiytreyvus <at> riseup.net>

Date: Sun, 23 Sep 2012 18:21:01 UTC

Severity: normal

Done: Jim Meyering <jim <at> meyering.net>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 12494 <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Georgiy Treyvus <georgiytreyvus <at> riseup.net>
Cc: 12494 <at> debbugs.gnu.org
Subject: Re: bug#12494: 0 exit status even when chmod fails
Date: Sun, 23 Sep 2012 23:29:13 -0700
On 09/22/2012 10:59 PM, Georgiy Treyvus wrote:
> it shouldn't be returning a 0 exit code for failure

Unless I'm missing something, I'd guess that
the chmod command is just executing the chmod
system call, which means that if it is reporting
success that one should be looking at how the
system call is implemented, not at how the
chmod command is implemented.

You can test this theory by running it under
strace.  E.g.:

  strace -o chmod.tr chmod 755 file

and look at what 'chmod.tr' says about when the
chmod system call is being executed.




This bug report was last modified 12 years and 245 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.