9 Commits
Author SHA1 Message Date
Joachim Nilsson 2a709f739d Reverse christmas tree and simplify a bit
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-04-06 12:45:29 +02:00
Joachim Nilsson 2bea4192db Handle UEV_HUP properly in examples and unit tests
If an I/O watcher callback fails to read(), returning zero, we check
events for UEV_HUP to detect EOF or socket remote end shutdown().

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-11-14 12:56:39 +01:00
Joachim Nilsson d52254b4ec Make sure to restart the I/O watcher on UEV_ERROR
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-11-14 12:17:41 +01:00
Joachim Nilsson ddfc1460eb redirect: Update example to handle new failure mode
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-11-11 13:59:05 +01:00
Joachim Nilsson 71e6d78fdc redirect: Use err.h functions for error handling
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-11-11 13:58:35 +01:00
Joachim Nilsson 9642443a7c Clean up redirect example a bit
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-10-22 11:16:10 +02:00
Joachim Nilsson 98748277f3 Add Emacs hints for indentation
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-10-21 20:52:30 +02:00
Joachim Nilsson d46ff8e396 redirect: Make sure example application does not exit on len==0
We want to continue running the event loop until it is exited properly,
not if the callback for stdin detects a short read.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-10-21 19:54:00 +02:00
Joachim Nilsson 58ec8e1d6f Simple example of stdin redirect problem, issue #12
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-10-21 18:46:55 +02:00