dsynth - Fix waitpid() bug, revamp phase poll loop
authorMatthew Dillon <dillon@apollo.backplane.com>
Thu, 22 Aug 2019 03:50:21 +0000 (20:50 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Thu, 22 Aug 2019 03:50:21 +0000 (20:50 -0700)
commit7880dcf7e8780236628d63308c90166a1c7189a7
tree4959292d32b1de899d4d26868e58a05c3afe6992
parent8ec23ca1bfc4bd005dc50b54a4f6182d703928ee
dsynth - Fix waitpid() bug, revamp phase poll loop

* Fix an issue where the wrong wait*() status is processed as
  the error code.  This could occur especially on slow machines.

* Be sure to clean out any log data on the pty while and after
  processing the wait*() on the primary pid as there might be
  some as-yet unprocessed data.

* Use non-blocking mode on the masterpty to ensure that we
  don't accidently block on it.
usr.bin/dsynth/build.c