develooper Front page | perl.perl5.porters | Postings from August 2016

[perl #128967] Inconsistency between doc and code for chown usingnegative argument: -1

Thread Previous
From:
Atoomic
Date:
August 16, 2016 22:50
Subject:
[perl #128967] Inconsistency between doc and code for chown usingnegative argument: -1
Message ID:
rt-4.0.24-2199-1471387831-1617.128967-75-0@perl.org
# New Ticket Created by  Atoomic 
# Please include the string:  [perl #128967]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=128967 >


Recent change to perl 5.24 change the chown behavior when using -1 argument:
https://github.com/Perl/perl5/commit/f95ba548a286b17c260cc168715a9d0d441b14a6

But perldoc for chow still mention:
"A value of -1 in either position is interpreted by most systems to leave that value unchanged."

I'm not sure which part is incorrect: the doc ? or the change ?
My code was currently using the chown -1 feature documented.

Is it now deprecated ?
Should we revert this commit or update the doc ?

Thanks for the clarification on this.
nicolas

# chown root: /tmp/xxx; perl522 -E 'open my $f, ">",  "/tmp/xxx"; say chown -1, 99, $f'; ls -l /tmp/xxx
1
-rw-r--r-- 1 root nobody 0 Aug 16 16:45 /tmp/xxx

# chown root: /tmp/xxx; perl524 -E 'open my $f, ">",  "/tmp/xxx"; say chown -1, 99, $f'; ls -l /tmp/xxx
0
-rw-r--r-- 1 root root 0 Aug 16 16:46 /tmp/xxx


Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About