lseek/read is racy when there is multiple consumers. Use pread instead.
authorclaudio <claudio@openbsd.org>
Mon, 27 Nov 2017 23:04:26 +0000 (23:04 +0000)
committerclaudio <claudio@openbsd.org>
Mon, 27 Nov 2017 23:04:26 +0000 (23:04 +0000)
commite513baa25b23142c40772578f821a24b0f6fab5f
tree84e568af4df55d1d5a4684bebc3cce80f2ff56d7
parentb3dbe383f2ec7dca69d604f26afe4742248ebfe8
lseek/read is racy when there is multiple consumers. Use pread instead.
Solves the startup issues seen by bluhm@. pread idea from guenther@.
While there save the errno in the error case.
OK bluhm@
usr.sbin/relayd/relay.c