summaryrefslogtreecommitdiffstats
path: root/logwrapper/include
diff options
context:
space:
mode:
authorRom Lemarchand <romlem@google.com>2013-01-09 10:20:25 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2013-01-29 00:04:50 +0000
commit75c289aab9b81dc2235680cf141a4b183ee49391 (patch)
treeea21b9ff0ad4d435e67b8903a4b5642f8794b7f0 /logwrapper/include
parent83dee8e4e5346553f435626b46487d51b1e0ff2d (diff)
downloadcore-75c289aab9b81dc2235680cf141a4b183ee49391.tar.gz
core-75c289aab9b81dc2235680cf141a4b183ee49391.tar.bz2
core-75c289aab9b81dc2235680cf141a4b183ee49391.zip
logwrap: wait for child process when receiving SIGINT or SIGQUIT
- Wait for the child to exit before propagating SIGINT and SIGQUIT to the parent - Add ignore_int_quit argument to logwrap() that gives the caller the option to ignore SIGINT and SIGQUIT while logwrap is running Change-Id: If5c96cf23094917211310f00aa6aed515f110f5b
Diffstat (limited to 'logwrapper/include')
-rw-r--r--logwrapper/include/logwrap/logwrap.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/logwrapper/include/logwrap/logwrap.h b/logwrapper/include/logwrap/logwrap.h
index 722dda2ac..6593f3cb4 100644
--- a/logwrapper/include/logwrap/logwrap.h
+++ b/logwrapper/include/logwrap/logwrap.h
@@ -18,6 +18,8 @@
#ifndef __LIBS_LOGWRAP_H
#define __LIBS_LOGWRAP_H
+#include <stdbool.h>
+
__BEGIN_DECLS
/*
@@ -36,13 +38,17 @@ __BEGIN_DECLS
* NULL-terminated
* status: the equivalent child status as populated by wait(status). This
* value is only valid when logwrap successfully completes
+ * ignore_int_quit: set to true if you want to completely ignore SIGINT and
+ * SIGQUIT while logwrap is running. This may force the end-user to
+ * send a signal twice to signal the caller (once for the child, and
+ * once for the caller)
*
* Return value:
* 0 when logwrap successfully run the child process and captured its status
* -1 when an internal error occurred
*
*/
-int logwrap(int argc, char* argv[], int *status);
+int logwrap(int argc, char* argv[], int *status, bool ignore_int_quit);
__END_DECLS