--- EV/EV.xs 2007/11/01 17:45:30 1.38 +++ EV/EV.xs 2007/11/02 11:02:22 1.39 @@ -519,10 +519,31 @@ int active = w->active; if (active) ev_signal_stop (w); + ev_signal_set (w, signum); + if (active) ev_signal_start (w); } +int signal (struct ev_signal *w, SV *new_signal = 0) + CODE: +{ + Signal signum = new_signal ? sv_signum (signal) : 0; /* may croak here */ + RETVAL = w->signum; + + if (items > 1) + { + int active = w->active; + if (active) ev_signal_stop (w); + + ev_signal_set (w, signum); + + if (active) ev_signal_start (w); + } +} + OUTPUT: + RETVAL + MODULE = EV PACKAGE = EV::Time MODULE = EV PACKAGE = EV::Timer PREFIX = ev_timer_ @@ -573,7 +594,9 @@ { int active = w->active; if (active) ev_periodic_stop (w); + ev_periodic_set (w, at, interval); + if (active) ev_periodic_start (w); } @@ -626,10 +649,31 @@ { int active = w->active; if (active) ev_child_stop (w); + ev_child_set (w, pid); + if (active) ev_child_start (w); } +int pid (struct ev_child *w, int new_pid = 0) + CODE: +{ + RETVAL = newSVsv (w->pid); + + if (items > 1) + { + int active = w->active; + if (active) ev_child_stop (w); + + ev_child_set (w, new_pid); + + if (active) ev_child_start (w); + } +} + OUTPUT: + RETVAL + + int status (struct ev_child *w) CODE: RETVAL = w->status;