buftee
11 years agoFirst cut at test.
Emil Mikulic [Sun, 24 Mar 2013 09:42:04 +0000 (20:42 +1100)]
First cut at test.

11 years agoMove shared mutex and cond from global to per-writer.
Emil Mikulic [Sun, 24 Mar 2013 08:26:55 +0000 (19:26 +1100)]
Move shared mutex and cond from global to per-writer.

11 years agoMake STDERR nonblocking again after SIGCONT.
Emil Mikulic [Sun, 10 Mar 2013 17:06:01 +0000 (04:06 +1100)]
Make STDERR nonblocking again after SIGCONT.

Without this, flow control on the tty can block execution if we
were stopped and continued.

11 years agoHandle write() returning EAGAIN by sleeping and retrying.
Emil Mikulic [Sun, 10 Mar 2013 16:57:56 +0000 (03:57 +1100)]
Handle write() returning EAGAIN by sleeping and retrying.

Before this change, flow control on the tty caused the entire
program to exit.  After the change, we survive fine, and continue to
write to other file descriptors while the tty is blocked.

11 years agoDead code: remove max().
Emil Mikulic [Sun, 10 Mar 2013 16:45:41 +0000 (03:45 +1100)]
Dead code: remove max().

11 years agoReduce locking in writer_routine().
Emil Mikulic [Sun, 10 Mar 2013 16:45:24 +0000 (03:45 +1100)]
Reduce locking in writer_routine().

11 years agoCleanly handle select() returning EINTR.
Emil Mikulic [Sun, 10 Mar 2013 17:23:34 +0000 (04:23 +1100)]
Cleanly handle select() returning EINTR.

This is usually the result of catching SIGTERM (via ^C).
After this change, we exit cleanly.

11 years agoShow TID instead of PID in warn_time().
Emil Mikulic [Sun, 10 Mar 2013 17:23:14 +0000 (04:23 +1100)]
Show TID instead of PID in warn_time().

11 years agoAdd clang sanitized build.
Emil Mikulic [Sun, 10 Mar 2013 16:34:21 +0000 (03:34 +1100)]
Add clang sanitized build.

11 years agoInitial revision.
Emil Mikulic [Sun, 10 Mar 2013 17:14:23 +0000 (04:14 +1100)]
Initial revision.