fix for multiple lock/unlock operations in 'lock' command (found by framer99)
SVN-Revision: 6286
This commit is contained in:
parent
3d33ced049
commit
caa2254e97
1 changed files with 1 additions and 2 deletions
|
@ -39,7 +39,7 @@ diff -ruN busybox-1.3.1-old/miscutils/Kbuild busybox-1.3.1/miscutils/Kbuild
|
||||||
diff -ruN busybox-1.3.1-old/miscutils/lock.c busybox-1.3.1/miscutils/lock.c
|
diff -ruN busybox-1.3.1-old/miscutils/lock.c busybox-1.3.1/miscutils/lock.c
|
||||||
--- busybox-1.3.1-old/miscutils/lock.c 1970-01-01 01:00:00.000000000 +0100
|
--- busybox-1.3.1-old/miscutils/lock.c 1970-01-01 01:00:00.000000000 +0100
|
||||||
+++ busybox-1.3.1/miscutils/lock.c 2006-12-28 03:11:36.000000000 +0100
|
+++ busybox-1.3.1/miscutils/lock.c 2006-12-28 03:11:36.000000000 +0100
|
||||||
@@ -0,0 +1,136 @@
|
@@ -0,0 +1,135 @@
|
||||||
+/*
|
+/*
|
||||||
+ * Copyright (C) 2006 Felix Fietkau <nbd@openwrt.org>
|
+ * Copyright (C) 2006 Felix Fietkau <nbd@openwrt.org>
|
||||||
+ *
|
+ *
|
||||||
|
@ -73,7 +73,6 @@ diff -ruN busybox-1.3.1-old/miscutils/lock.c busybox-1.3.1/miscutils/lock.c
|
||||||
+static void exit_unlock(int sig)
|
+static void exit_unlock(int sig)
|
||||||
+{
|
+{
|
||||||
+ flock(fd, LOCK_UN);
|
+ flock(fd, LOCK_UN);
|
||||||
+ unlink(file);
|
|
||||||
+ exit(0);
|
+ exit(0);
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
|
|
Loading…
Reference in a new issue