pty: clean-up
printf: do not use multiple (v)fprintf
printf: log to syslog when detached
printf: clean-up