summaryrefslogtreecommitdiffstats
path: root/perl-install/devices.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2008-12-15 16:44:06 +0000
committerThierry Vignaud <tv@mandriva.org>2008-12-15 16:44:06 +0000
commitddff323054ed16eac45325b776432b930590858b (patch)
treeb24df4823f126d4fe062221ce5ab4d85d48a37c5 /perl-install/devices.pm
parentf4f10f4e0e480c67fd2dcb4c9679c44b13ee1369 (diff)
downloaddrakx-ddff323054ed16eac45325b776432b930590858b.tar
drakx-ddff323054ed16eac45325b776432b930590858b.tar.gz
drakx-ddff323054ed16eac45325b776432b930590858b.tar.bz2
drakx-ddff323054ed16eac45325b776432b930590858b.tar.xz
drakx-ddff323054ed16eac45325b776432b930590858b.zip
(make) fix racing with udev (#41832)
Diffstat (limited to 'perl-install/devices.pm')
-rw-r--r--perl-install/devices.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/perl-install/devices.pm b/perl-install/devices.pm
index 4d1d9745e..6b091be27 100644
--- a/perl-install/devices.pm
+++ b/perl-install/devices.pm
@@ -185,7 +185,9 @@ sub make($) {
#- make a directory for this inode if needed.
mkdir_p(dirname($file));
- syscall_('mknod', $file, $type | 0600, makedev($major, $minor)) or die "mknod failed (dev $_): $!";
+ syscall_('mknod', $file, $type | 0600, makedev($major, $minor)) or do {
+ die "mknod failed (dev $_): $!" if ! -e $file; # we may have raced with udev
+ };
$file;
}