spi-hdlc-adapter: Don't call `syslog()` or `fprintf()` from signal handlers. (#339)
spi-hdlc-adapter: Don't call `syslog()` or `fprintf()` from signal handlers. (#339)

`syslog()` and `fprintf()` are not async-signal-safe. They can (and
do) cause deadlocks under various circumstances.

This change replaces the calls to these functions with calls to
`write()`. It also adds a watchdog of sorts to the `signal_critical()`
handler to make sure that even if we call some functions that
are not async-signal-safe that we will at least terminate eventually.
mszczodrak/openthread,pvanhorn/openthread,georgecpr/openthread,Zolertia/openthread,jwhui/openthread,gandreello/openthread,librasungirl/openthread,erja-gp/openthread,georgecpr/openthread,pvanhorn/openthread,openthread/openthread,fbsder/openthread,openthread/openthread,abtink/openthread,aeliot/openthread,chshu/openthread,vaas-krish/openthread,turon/openthread,vaas-krish/openthread,mszczodrak/openthread,LeZhang2016/openthread,nibanks/openthread,librasungirl/openthread,vaas-krish/openthread,jjlee3/openthread,fbsder/openthread,erja-gp/openthread,georgecpr/openthread,jwhui/openthread,erja-gp/openthread,aeliot/openthread,abtink/openthread,jjlee9/openthread,JakubBrachTieto/openthread,jjlee9/openthread,jjlee9/openthread,xiaom-GitHub/openthread,LeZhang2016/openthread,aeliot/openthread,LeZhang2016/openthread,GiedriusM/openthread,gandreello/openthread,JakubBrachTieto/openthread,abtink/openthread,Zolertia/openthread,fbsder/openthread,GiedriusM/openthread,nibanks/openthread,fbsder/openthread,librasungirl/openthread,gandreello/openthread,chshu/openthread,xiaom-GitHub/openthread,JakubBrachTieto/openthread,jjlee9/openthread,LeZhang2016/openthread,jwhui/openthread,pvanhorn/openthread,srickardti/openthread,gandreello/openthread,erja-gp/openthread,GiedriusM/openthread,GiedriusM/openthread,chshu/openthread,gandreello/openthread,JakubBrachTieto/openthread,pvanhorn/openthread,srickardti/openthread,librasungirl/openthread,chshu/openthread,turon/openthread,aeliot/openthread,pvanhorn/openthread,xiaom-GitHub/openthread,srickardti/openthread,lanyuwen/openthread,chshu/openthread,openthread/openthread,LeZhang2016/openthread,nibanks/openthread,vaas-krish/openthread,turon/openthread,LeZhang2016/openthread,Zolertia/openthread,jjlee3/openthread,turon/openthread,srickardti/openthread,nibanks/openthread,lanyuwen/openthread,lanyuwen/openthread,openthread/openthread,jjlee3/openthread,jjlee9/openthread,pvanhorn/openthread,xiaom-GitHub/openthread,chshu/openthread,georgecpr/openthread,Zolertia/openthread,mszczodrak/openthread,GiedriusM/openthread,JakubBrachTieto/openthread,jjlee9/openthread,mszczodrak/openthread,fbsder/openthread,vaas-krish/openthread,Zolertia/openthread,xiaom-GitHub/openthread,georgecpr/openthread,bukepo/openthread,vaas-krish/openthread,erja-gp/openthread,georgecpr/openthread,lanyuwen/openthread,jwhui/openthread,lanyuwen/openthread,abtink/openthread,mszczodrak/openthread,xiaom-GitHub/openthread,erja-gp/openthread,gandreello/openthread,lanyuwen/openthread,jjlee3/openthread,aeliot/openthread,aeliot/openthread,jjlee3/openthread,bukepo/openthread,bukepo/openthread,JakubBrachTieto/openthread,bukepo/openthread,mszczodrak/openthread,nibanks/openthread,fbsder/openthread,nibanks/openthread