summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2009-01-06 13:39:55 +0000
committerThierry Vignaud <tv@mandriva.org>2009-01-06 13:39:55 +0000
commit850f322414aa53c5bde28519f3523bae4c0bad03 (patch)
treee1fdf9135a2c720659e2d171147d5345f2aaae88
parent62ca5f089c1c9bab86a512d3e841371ae90ba648 (diff)
downloaddrakx-850f322414aa53c5bde28519f3523bae4c0bad03.tar
drakx-850f322414aa53c5bde28519f3523bae4c0bad03.tar.gz
drakx-850f322414aa53c5bde28519f3523bae4c0bad03.tar.bz2
drakx-850f322414aa53c5bde28519f3523bae4c0bad03.tar.xz
drakx-850f322414aa53c5bde28519f3523bae4c0bad03.zip
(make) fix racing with udev (#41832) [backported from trunk]
-rw-r--r--perl-install/NEWS1
-rw-r--r--perl-install/devices.pm4
2 files changed, 4 insertions, 1 deletions
diff --git a/perl-install/NEWS b/perl-install/NEWS
index 97b8e85f4..c10bc1503 100644
--- a/perl-install/NEWS
+++ b/perl-install/NEWS
@@ -1,5 +1,6 @@
- diskdrake:
o fix crashing on writing fstab when using SMB (#46084)
+ o fix racing with udev (#41832)
o --nfs: handle "host:/" (#44320)
Version 11.71.2 - 5 December 2008
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;
}