Re: [PATCH] Documentation/Makefile: remove cmd-list.made before redirecting to it.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Junio C Hamano <gitster@xxxxxxxxx> writes:

> Although I understand that it would be a problem if you built as
> root earlier, which would have left files unmodifyable by you, I
> think this is getting out of hand.  The cmd-list.perl script itself,
> for example, does "creat in $out+, if the contents have changed from
> the last round then rename $out+ to $out" sequence in order to avoid
> unnecessary rebuild of files that depend on the generated command
> list.  If it is interrupted in the middle while running as root, and
> then you try to do another build, I suspect "creat in $out+" part
> would fail.

No, creat is only interested in the directory permissions.  It is
open(..., O_TRUNC) that causes the problem.  There are not many
programs that actually use that for their output files, but shell
output redirection is one of them, and some editors tend to do this as
well in order to easily preserve permissions.

There are no other shell output redirections to an undeleted file in
the Makefile.

-- 
David Kastrup

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux