phk 1c0399f798 Return length from fwopen() file callback instead of zero.
The symptom is that syslog() fails to log anything but the "ident"
string if LOG_PERROR is specified to openlog(3) and the extensible
printf is in action.

For unclear, likely quaint historical reasons, syslog uses fwopen()
on a stack buffer, rather than using the more straightforward
and faster snprintf().

Along the way, fflush(3) is called, and since the callback writer
function returns zero instead of the length "written", __SERR
naturally gets set on the filedescriptor.

The extensible printf, in difference from the normal printf refuses
to output anything to an __SERR marked filedescriptor, and thus
the actual syslog message is supressed.

MFC:	after 2 weeks
2006-08-07 20:12:18 +00:00
..
2006-04-12 19:51:14 +00:00
2006-07-27 04:54:03 +00:00
2006-07-27 04:54:03 +00:00
2006-04-13 08:12:31 +00:00
2006-03-16 15:18:17 +00:00
2006-03-16 15:18:17 +00:00
2006-06-06 16:58:19 +00:00
2006-03-16 15:18:17 +00:00
2006-07-28 21:34:37 +00:00
2006-03-23 14:09:21 +00:00
2006-08-04 17:56:31 +00:00