Bug #5748

nfsd: DEBUG is never defined

Added by Marcel Telka over 3 years ago. Updated over 3 years ago.

Status:NewStart date:2015-03-24
Priority:LowDue date:
Assignee:-% Done:

0%

Category:nfs - NFS server and client
Target version:-
Difficulty:Bite-size Tags:needs-triage

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:

  1. The DEBUG is never defined during the nfsd build, so line 431 is always compiled in.
  2. 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.

History

#1 Updated by Gordon Ross over 3 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.

#2 Updated by Marcel Telka over 3 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.

Also available in: Atom