[Bug libfortran/36755] Avoid fork/exec in chmod intrinsic
burnus at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Jan 12 19:26:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36755
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
AssignedTo|unassigned at gcc dot |burnus at gcc dot gnu.org
|gnu.org |
--- Comment #9 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-01-12 19:25:31 UTC ---
(In reply to comment #8)
> It honors the "umask", allows for fancy combinations such as
> "g+w-r,a+x,-w,o=u,u+s,+t".
Seemingly, I misread POSIX: For my program o=u sets "other" to the original
permissions. By contrast, GNU chmod sets it to the last permission. For:
umask 022; mkdir foo; chmod g+w-r,a+x,-w,o=u foo
the difference is whether other is r-x or rwx. In the code: Simply replace
"old_mode" by "file_mode".
I have meanwhile also converted the fixed program into a libgfortran patch:
http://gcc.gnu.org/ml/fortran/2012-01/msg00126.html
More information about the Gcc-bugs
mailing list