4 * Created on: Sep 18, 2010
11 #include <sys/types.h>
16 #include "process_listener.h"
18 static pthread_t _listener_thread;
19 static bool _continue;
21 static void *process_listener_thread(void *thread_args_pointer)
27 closed_pid = wait(&status);
28 if (closed_pid >= 0) {
29 printf("process closed: %d, status: %d\n", closed_pid, status);
35 void start_process_listener() {
36 printf("listen_closed_processes()\n");
40 pthread_create(&_listener_thread,
42 process_listener_thread,
46 void stop_process_listener() {
48 // pthread_cancel(_listener_thread);
49 // pthread_join(_listener_thread, NULL);