diff options
Diffstat (limited to 'winsup/cygwin/gendevices')
-rwxr-xr-x | winsup/cygwin/gendevices | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/winsup/cygwin/gendevices b/winsup/cygwin/gendevices index 0b2271e71..cd7a53b9e 100755 --- a/winsup/cygwin/gendevices +++ b/winsup/cygwin/gendevices @@ -73,7 +73,13 @@ for (my $i = 0; $i < @lines; $i++) { redo; }; } -open(OUTPUT, '>', $output) or die "$0: couldn't open $output - $!\n"; +open(OUTPUT, '>', $output) or do {{ + if (chmod(0664, $output)) { + open(OUTPUT, '>', $output); + last; + } + die "$0: couldn't open $output - $!\n"; +}}; print OUTPUT @lines; close OUTPUT; |