Bug #5748
nfsd: DEBUG is never defined
Status:
New
Priority:
Low
Assignee:
-
Category:
nfs - NFS server and client
Start date:
2015-03-24
Due date:
% Done:
0%
Estimated time:
Difficulty:
Bite-size
Tags:
needs-triage
Gerrit CR:
Description
This is in nfsd main():
430#ifndef DEBUG 431 pipe_fd = daemonize_init(); 432#endif
Both lines 430 and 432 should be removed for various reasons:
- The DEBUG is never defined during the nfsd build, so line 431 is always compiled in.
- In a case the DEBUG is enabled for some reason in future, and the daemonize_init() call won't be included in the nfsd binary, the nfs/server SMF service will fail, since the nfsd process will run forever.
Updated by Gordon Ross almost 6 years ago
Other programs using damonize_init / daemonize_fini do both conditional on a run-time debug option flag.
That's probably the better thing to do here.
Updated by Marcel Telka almost 6 years ago
Gordon Ross wrote:
Other programs using damonize_init / daemonize_fini do both conditional on a run-time debug option flag.
That's probably the better thing to do here.
Obviously, the problem is that nfsd does not have a run-time debug flag defined (yet) and I'm not sure we want to define it now, just for the damonize_init() call.