path: root/makewrappers
diff options
authorPeter Seebach <seebs@eee12.(none)>2010-04-20 19:00:22 -0500
committerPeter Seebach <peter.seebach@windriver.com>2010-04-26 17:13:45 -0700
commitaceacb055724aae4c4e8822db19a8faf1943d9ef (patch)
treeb26b857bd2252e08f2d2751ea14d4aee593ba5e3 /makewrappers
parent4d057af5c6f3d47cafa061267a0490d2222983fe (diff)
Reduce race condition for unlinks.
If multiple clients are active at once, the following could occur: * Client #1 unlinks file A * Client #2 creates file B, which reuses A's inode * Client #2 sends request to server * Client #1 sends request to server * Processing client #2's request creates a mismatch warning for file A/B. * Processing client #1's request creates a mismatch warning too. Note that this can happen even if Client #2 sends its request later, as there's no intrinsic guarantee of the order in which requests are processed; any SINGLE client is presumably executing operations in order, but multiple clients aren't. Fixing this in rmdir, unlink, and rename.
Diffstat (limited to 'makewrappers')
1 files changed, 1 insertions, 0 deletions
diff --git a/makewrappers b/makewrappers
index cd6a675..d269aa3 100755
--- a/makewrappers
+++ b/makewrappers
@@ -273,6 +273,7 @@ EOF
pseudo_debug(4, "called: $name\n");
if (pseudo_getlock()) {
errno = EBUSY;
+ sigprocmask(SIG_SETMASK, &saved, NULL);
$(write_return $default_value);