Project

General

Profile

Bug #5748

nfsd: DEBUG is never defined

Added by Marcel Telka about 5 years ago. Updated about 5 years ago.

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:

  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 about 5 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 about 5 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 PDF