diff options
author | Mike Frysinger <vapier@gentoo.org> | 2009-04-05 00:56:30 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2009-04-05 03:54:05 -0400 |
commit | 4f5ba92246606723806c0585393f21244d44036c (patch) | |
tree | 8faf05e0b33f28068c3cafff95694446a3b504a6 /libsandbox/libsandbox.h | |
parent | tests: add some tracing tests (diff) | |
download | sandbox-4f5ba92246606723806c0585393f21244d44036c.tar.gz sandbox-4f5ba92246606723806c0585393f21244d44036c.tar.bz2 sandbox-4f5ba92246606723806c0585393f21244d44036c.zip |
libsandbox: force lock sanity across forks
Classic example of forks being used in multithreaded applications and
causing havoc with shared state (locks in this case). Make sure that
threads grabbing the sandbox lock don't screw up threads that do a fork
and then exec.
URL: http://bugs.gentoo.org/263657
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Reported-by: Ryan Hope <rmh3093@gmail.com>
Diffstat (limited to 'libsandbox/libsandbox.h')
-rw-r--r-- | libsandbox/libsandbox.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libsandbox/libsandbox.h b/libsandbox/libsandbox.h index d20b81f..281ebf5 100644 --- a/libsandbox/libsandbox.h +++ b/libsandbox/libsandbox.h @@ -59,6 +59,9 @@ extern char sandbox_lib[SB_PATH_MAX]; extern bool sandbox_on; extern pid_t trace_pid; +extern void sb_lock(void); +extern void sb_unlock(void); + void trace_main(const char *filename, char *const argv[]); __attribute__((__format__(__printf__, 1, 2))) void sb_eqawarn(const char *format, ...); |