ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/libev/ev.pod
(Generate patch)

Comparing libev/ev.pod (file contents):
Revision 1.187 by root, Mon Sep 29 03:31:14 2008 UTC vs.
Revision 1.188 by root, Tue Sep 30 18:35:47 2008 UTC

1625 1625
1626=back 1626=back
1627 1627
1628=head3 Examples 1628=head3 Examples
1629 1629
1630Example: Try to exit cleanly on SIGINT and SIGTERM. 1630Example: Try to exit cleanly on SIGINT.
1631 1631
1632 static void 1632 static void
1633 sigint_cb (struct ev_loop *loop, struct ev_signal *w, int revents) 1633 sigint_cb (struct ev_loop *loop, struct ev_signal *w, int revents)
1634 { 1634 {
1635 ev_unloop (loop, EVUNLOOP_ALL); 1635 ev_unloop (loop, EVUNLOOP_ALL);
1636 } 1636 }
1637 1637
1638 struct ev_signal signal_watcher; 1638 struct ev_signal signal_watcher;
1639 ev_signal_init (&signal_watcher, sigint_cb, SIGINT); 1639 ev_signal_init (&signal_watcher, sigint_cb, SIGINT);
1640 ev_signal_start (loop, &sigint_cb); 1640 ev_signal_start (loop, &signal_watcher);
1641 1641
1642 1642
1643=head2 C<ev_child> - watch out for process status changes 1643=head2 C<ev_child> - watch out for process status changes
1644 1644
1645Child watchers trigger when your process receives a SIGCHLD in response to 1645Child watchers trigger when your process receives a SIGCHLD in response to

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines