<div dir="ltr">looks good to me,<div><br></div><div style>this also maks the completion of review for patches 02/17-05/17</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jun 5, 2013 at 1:05 PM, Ben Pfaff <span dir="ltr"><<a href="mailto:blp@nicira.com" target="_blank">blp@nicira.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Signed-off-by: Ben Pfaff <<a href="mailto:blp@nicira.com">blp@nicira.com</a>><br>
---<br>
lib/process.c | 4 ++++<br>
lib/process.h | 14 ++++++++++----<br>
2 files changed, 14 insertions(+), 4 deletions(-)<br>
<br>
diff --git a/lib/process.c b/lib/process.c<br>
index 22dd266..c09737a 100644<br>
--- a/lib/process.c<br>
+++ b/lib/process.c<br>
@@ -60,6 +60,8 @@ static void sigchld_handler(int signr OVS_UNUSED);<br>
/* Initializes the process subsystem (if it is not already initialized). Calls<br>
* exit() if initialization fails.<br>
*<br>
+ * This function may not be called after creating any additional threads.<br>
+ *<br>
* Calling this function is optional; it will be called automatically by<br>
* process_start() if necessary. Calling it explicitly allows the client to<br>
* prevent the process from exiting at an unexpected time. */<br>
@@ -167,6 +169,8 @@ process_register(const char *name, pid_t pid)<br>
* argv[0] is used as the name of the process. Searches the PATH environment<br>
* variable to find the program to execute.<br>
*<br>
+ * This function may not be called after creating any additional threads.<br>
+ *<br>
* All file descriptors are closed before executing the subprocess, except for<br>
* fds 0, 1, and 2.<br>
*<br>
diff --git a/lib/process.h b/lib/process.h<br>
index d17737d..3feac7e 100644<br>
--- a/lib/process.h<br>
+++ b/lib/process.h<br>
@@ -21,21 +21,27 @@<br>
#include <sys/types.h><br>
<br>
struct process;<br>
+<br>
+/* Starting and monitoring subprocesses.<br>
+ *<br>
+ * process_init() and process_start() may safely be called only from a<br>
+ * single-threaded parent process. The parent process may safely create<br>
+ * additional threads afterward, as long as the remaining functions in this<br>
+ * group are called only from a single thread at any given time. */<br>
void process_init(void);<br>
-char *process_escape_args(char **argv);<br>
int process_start(char **argv, struct process **);<br>
void process_destroy(struct process *);<br>
int process_kill(const struct process *, int signr);<br>
-<br>
pid_t process_pid(const struct process *);<br>
const char *process_name(const struct process *);<br>
bool process_exited(struct process *);<br>
int process_status(const struct process *);<br>
-char *process_status_msg(int);<br>
-<br>
void process_run(void);<br>
void process_wait(struct process *);<br>
<br>
+/* These functions are thread-safe. */<br>
+char *process_status_msg(int);<br>
+char *process_escape_args(char **argv);<br>
char *process_search_path(const char *);<br>
<br>
#endif /* process.h */<br>
<span class="HOEnZb"><font color="#888888">--<br>
1.7.2.5<br>
<br>
_______________________________________________<br>
dev mailing list<br>
<a href="mailto:dev@openvswitch.org">dev@openvswitch.org</a><br>
<a href="http://openvswitch.org/mailman/listinfo/dev" target="_blank">http://openvswitch.org/mailman/listinfo/dev</a><br>
</font></span></blockquote></div><br></div>