chiark / gitweb /
Report input file start to debug log
[innduct.git] / innduct.h
index 00be640f73a33aca2e15ab2202cee214d6dab8df..273fb5ec7758df00f196a34dfe8580621b45c5c4 100644 (file)
--- a/innduct.h
+++ b/innduct.h
 
 #define DUMPV(fmt,pfx,v) fprintf(f, " " #v "=" fmt, pfx v);
 
-#define FOR_CONN(conn) \
-  for ((conn)=LIST_HEAD(conns); (conn); (conn)=LIST_NEXT((conn)))
+#define FOR_LIST_NODE(nodevar, list) \
+  for ((nodevar)=LIST_HEAD(list); (nodevar); (nodevar)=LIST_NEXT((nodevar)))
+
+#define FOR_CONN(conn) FOR_LIST_NODE(conn, conns)
 
 /*----- doubly linked lists -----*/
 
@@ -327,7 +329,8 @@ char *xasprintf(const char *fmt, ...) PRINTF(1,2);
 int close_perhaps(int *fd);
 void xclose(int fd, const char *what, const char *what2);
 void xclose_perhaps(int *fd, const char *what, const char *what2);
-pid_t xfork(const char *what);
+pid_t xfork(const char *what); /* also runs postfork in child */
+pid_t xfork_bare(const char *what);
 
 void on_fd_read_except(int fd, oop_call_fd callback);
 void cancel_fd_read_except(int fd);