sahlberg / libnfs

NFS client library
Other
524 stars 201 forks source link

Rewrite RPC_LOG to use a callback logging function #492

Closed sahlberg closed 2 months ago

sahlberg commented 2 months ago

This macro right now unconditionally writes to stderr/ file descriptor 2. This breaks all embedded platforms and all applications that run in daemon mode as there is no guarantee that a console exist or that stderr/file descriptor 2 refers to a an actual file. For many daemons file descriptor 2 might be a socket to talk to mysql for all we know.