[vlc-devel] [PATCH 1/5] pkg-static.sh: close file before overwriting it.
robedmo.git at gmail.com
Thu Jun 1 01:16:07 CEST 2017
On Wed, May 31, 2017 at 1:50 AM, Jean-Baptiste Kempf <jb at videolan.org> wrote:
> On Wed, 31 May 2017, at 01:56, Robert Mourning wrote:
>> Improves support for building with Windows Subsystem for Linux.
>> When the input file is on DrvFs (windows file system), the "mv"
>> command which overwrites the original file fails unless the
>> file is closed first.
>> +exec <&-
> This requires a comment, IMHO. This syntax is not very clear, so when
> you read the code, you need help to understand it.
>> mv -f -- "$1.tmp" "$1"
I agree that a comment would be useful; it can be difficult to google for
the meaning of "<&-" without already knowing the keywords
associated with its function.
I'd suggest something like the following:
# close the stdin file descriptor, to which the input file was assigned
if providing the reason for closing would also be useful, the
following line could be included as well:
# this is necessary before overwriting the input file on some file systems.
Is it necessary to resubmit a patch with comment included?
More information about the vlc-devel