irattach daemonizes (closing fds) before calling
fprintf(stderr, ...); this results in EBADF instead of
proper diagnostics if TIOCSETD ioctl fails.
Either fds should be redirected to /dev/null, or at
least syslog()/fprintf() order should be reversed.
Patch to do the first fixup is attached (by Sergey
Vlasov, vsu altlinux org); see also
BTW, ALT Linux package has a few more patches, e.g.
http://sisyphus.ru/srpm/irda-utils/patches/3 (page in
Russian, patch in C ;-).