summaryrefslogtreecommitdiff
path: root/ev.h
diff options
context:
space:
mode:
authorroot <root>2008-01-25 15:45:08 +0000
committerroot <root>2008-01-25 15:45:08 +0000
commit6104d060a61e32a1a8d4e71d947b340fd13ac2f7 (patch)
tree25847f264eba11a4c9f0bb152f129dc98bed7871 /ev.h
parent66b451751514fa881505e9465cdd8e9484fef65d (diff)
*** empty log message ***
Diffstat (limited to 'ev.h')
-rw-r--r--ev.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/ev.h b/ev.h
index 1909055..b1ebab5 100644
--- a/ev.h
+++ b/ev.h
@@ -130,7 +130,7 @@ struct ev_loop;
# define EV_PROTOTYPES 1
#endif
-#define EV_VERSION_MAJOR 2
+#define EV_VERSION_MAJOR 3
#define EV_VERSION_MINOR 0
#ifndef EV_CB_DECLARE
@@ -227,6 +227,7 @@ typedef struct ev_child
{
EV_WATCHER_LIST (ev_child)
+ int flags; /* private */
int pid; /* ro */
int rpid; /* rw, holds the received pid */
int rstatus; /* rw, holds the exit status, use the macros from sys/wait.h */
@@ -457,7 +458,7 @@ void ev_once (EV_P_ int fd, int events, ev_tstamp timeout, void (*cb)(int revent
#define ev_timer_set(ev,after_,repeat_) do { (ev)->at = (after_); (ev)->repeat = (repeat_); } while (0)
#define ev_periodic_set(ev,ofs_,ival_,res_) do { (ev)->offset = (ofs_); (ev)->interval = (ival_); (ev)->reschedule_cb= (res_); } while (0)
#define ev_signal_set(ev,signum_) do { (ev)->signum = (signum_); } while (0)
-#define ev_child_set(ev,pid_) do { (ev)->pid = (pid_); } while (0)
+#define ev_child_set(ev,pid_,trace_) do { (ev)->pid = (pid_); (ev)->flags = !!(trace_); } while (0)
#define ev_stat_set(ev,path_,interval_) do { (ev)->path = (path_); (ev)->interval = (interval_); (ev)->wd = -2; } while (0)
#define ev_idle_set(ev) /* nop, yes, this is a serious in-joke */
#define ev_prepare_set(ev) /* nop, yes, this is a serious in-joke */
@@ -469,7 +470,7 @@ void ev_once (EV_P_ int fd, int events, ev_tstamp timeout, void (*cb)(int revent
#define ev_timer_init(ev,cb,after,repeat) do { ev_init ((ev), (cb)); ev_timer_set ((ev),(after),(repeat)); } while (0)
#define ev_periodic_init(ev,cb,at,ival,res) do { ev_init ((ev), (cb)); ev_periodic_set ((ev),(at),(ival),(res)); } while (0)
#define ev_signal_init(ev,cb,signum) do { ev_init ((ev), (cb)); ev_signal_set ((ev), (signum)); } while (0)
-#define ev_child_init(ev,cb,pid) do { ev_init ((ev), (cb)); ev_child_set ((ev),(pid)); } while (0)
+#define ev_child_init(ev,cb,pid,trace) do { ev_init ((ev), (cb)); ev_child_set ((ev),(pid),(trace)); } while (0)
#define ev_stat_init(ev,cb,path,interval) do { ev_init ((ev), (cb)); ev_stat_set ((ev),(path),(interval)); } while (0)
#define ev_idle_init(ev,cb) do { ev_init ((ev), (cb)); ev_idle_set ((ev)); } while (0)
#define ev_prepare_init(ev,cb) do { ev_init ((ev), (cb)); ev_prepare_set ((ev)); } while (0)