]> mj.ucw.cz Git - libucw.git/blobdiff - lib/mainloop.h
Multi-part objects (with header and body separated by an empty line and terminated
[libucw.git] / lib / mainloop.h
index 3cddb4185a73921b29ed0d0bd57a4784c6329e94..ffbf4e4d299096fa04889bf05ec1dcc21276cdfd 100644 (file)
@@ -11,6 +11,7 @@
 
 extern sh_time_t now;                          /* Current time */
 extern uns main_shutdown;
+extern clist main_timer_list, main_file_list, main_hook_list, main_process_list;
 
 /* User-defined fields are marked with [*], all other fields must be initialized to zero. */
 
@@ -73,8 +74,9 @@ void hook_del(struct main_hook *ho);
 
 struct main_process {
   cnode n;
-  int pid;
-  int status;                                  /* Exit status */
+  int pid;                                     /* Process id (0=not running) */
+  int status;                                  /* Exit status (-1=fork failed) */
+  byte status_msg[EXIT_STATUS_MSG_SIZE];
   void (*handler)(struct main_process *mp);    /* [*] Called when the process exits; process_del done automatically */
   void *data;                                  /* [*] For use by the handler */
 };