Commit Graph

272 Commits

Author SHA1 Message Date
Ian Gulliver cf923fe3fb Add --quiet 2016-03-09 13:10:07 -08:00
Ian Gulliver 87f82b0327 Keep fd 2 open as our log fd, so other things that write there (e.g. assert()) work sanely. 2016-03-09 13:06:26 -08:00
Ian Gulliver fc14de31ff Only grab SIGHUP if we can do something with it. 2016-03-09 12:55:21 -08:00
Ian Gulliver 7167c080a2 Log pre-fork process ID. 2016-03-08 23:19:21 -08:00
Ian Gulliver 62ee0a690c More startup debug info. 2016-03-08 23:17:26 -08:00
Ian Gulliver b455826db2 Switch to signalfd for SIGHUP 2016-03-08 23:04:20 -08:00
Ian Gulliver c0c25bd36a Clean up wakeup teardown. 2016-03-08 22:42:15 -08:00
Ian Gulliver 9f5a6223bf Fix shutdown for lack of input/output. 2016-03-08 22:30:55 -08:00
Ian Gulliver e885723c59 Use signalfd to handle SIGINT and SIGTERM shutdown. 2016-03-08 22:26:04 -08:00
Ian Gulliver ba13ebbe5c deheader 2016-03-08 22:00:08 -08:00
Ian Gulliver b915f38dca Switch out custom wakeup system for timerfd. 2016-03-08 21:53:57 -08:00
Ian Gulliver 3985182304 Stop relying on struct ordering and packing for peer. 2016-03-08 20:47:22 -08:00
Ian Gulliver d39cd62991 Cleanup how we cast and close peers. 2016-03-08 20:41:00 -08:00
Ian Gulliver cd302a1746 Move FORMAT parsing into send code. 2016-03-08 12:22:46 -08:00
Ian Gulliver d5eb4a919e Initialize server before resolve, since server forks and resolve starts a thread. 2016-03-08 11:28:21 -08:00
Ian Gulliver e5af92c331 Add --detach. Add multi-pass flag parsing that lets us get things in the right order. 2016-03-08 11:26:39 -08:00
Ian Gulliver 70ac401a23 Add missing help 2016-03-07 21:42:51 -08:00
Ian Gulliver eb89dafd0d Add --log-timestamps 2016-03-07 20:12:35 -08:00
Ian Gulliver 3bcc2b43ba Log more debug data. 2016-03-07 17:38:18 -08:00
Ian Gulliver 31bb8f2a95 Remove version.h on make clean 2016-03-07 17:18:51 -08:00
Ian Gulliver b7de1adca2 Start to generate version.h 2016-03-07 17:18:23 -08:00
Ian Gulliver 3ef52b16b5 Log file and line number. 2016-03-07 17:08:36 -08:00
Ian Gulliver b434b67dd8 Switch to LOG macro 2016-03-07 17:02:24 -08:00
Ian Gulliver 602c6f729b Add log rotation on SIGHUP 2016-03-07 16:14:35 -08:00
Ian Gulliver ff4f4da608 deheader cleanup 2016-03-07 15:19:00 -08:00
Ian Gulliver db271db748 Switch from pipe to socketpair for consistency. 2016-03-07 14:52:10 -08:00
Ian Gulliver 46696933aa Add --log-file 2016-03-07 11:26:25 -08:00
Ian Gulliver 51eaabe27a Format attributes go in the header, and I are dumb. 2016-03-06 22:08:04 -08:00
Ian Gulliver ca754a817e Cleaner logging of child output 2016-03-06 18:57:37 -08:00
Ian Gulliver c7e1754239 Capture & log child output, rather than sharing our stderr with them. 2016-03-06 18:50:15 -08:00
Ian Gulliver 352d14935f Fix leak & logic error in send/receive connections. 2016-03-06 18:49:41 -08:00
Ian Gulliver 6480a960fa Switch to standard logging framework 2016-03-05 22:54:26 -08:00
Ian Gulliver 06e73e2319 stutterfuzz: Fix crash when shutdown() returns ENOTCONN 2016-03-04 19:17:15 -08:00
Ian Gulliver 746379aee5 Treat SIGTERM like SIGINT 2016-03-04 13:02:43 -08:00
Ian Gulliver 9c1fad10a9 Mention hop limits. 2016-03-03 22:03:31 -08:00
Ian Gulliver 94562acd07 Need to regenerate test cases. Rename files, add new proto and json. 2016-03-03 22:02:16 -08:00
Ian Gulliver 45abe06467 Add hop limit to json and proto formats. 2016-03-03 22:00:02 -08:00
Ian Gulliver 455bee2676 Use some magic devices to prevent users hurting themselves with --file-read=/dev/stdin as we re-use fd 0 2016-03-03 21:27:16 -08:00
Ian Gulliver c101642f89 Style 2016-03-03 21:13:50 -08:00
Ian Gulliver e8a4c55111 Add send+receive and character devices 2016-03-03 21:13:17 -08:00
Ian Gulliver 939b3b1851 Add send-receive channels 2016-03-03 18:28:34 -08:00
Ian Gulliver 77b9decbcd Make send_get_hello public, so we can use it in send_receive 2016-03-02 22:30:45 -08:00
Ian Gulliver 2f6db632b2 Get everyone out of flow's business. 2016-03-02 22:25:56 -08:00
Ian Gulliver e62b84e4e8 Add a peer_count_out_in 2016-03-02 22:10:55 -08:00
Ian Gulliver eaf213f3c0 Set TCP_USERTIMEOUT even on send sockets, to detect stuck processes on the other end. 2016-03-02 22:07:48 -08:00
Ian Gulliver 10ba451458 Move more socket options into the flow framework. 2016-03-02 21:51:30 -08:00
Ian Gulliver 91775999d8 Rename socket_connected to socket_ready, since we use it before accept() 2016-03-02 19:28:02 -08:00
Ian Gulliver 14be11de79 Utility functions for reference counting. 2016-03-02 19:20:25 -08:00
Ian Gulliver 20bc50795d Move fd flow code into flow.c 2016-03-02 19:16:23 -08:00
Ian Gulliver 896874e9d7 Switch wakeup to standard list. 2016-03-02 19:10:31 -08:00