diff --git a/sm5/smartd.c b/sm5/smartd.c index 4266f28abd4744495b5a2a6abcc6af7af6b2591c..b880cd142e53c0219dc6a3a681fe7290cfd65c23 100644 --- a/sm5/smartd.c +++ b/sm5/smartd.c @@ -37,7 +37,7 @@ #include "ataprint.h" extern const char *CVSid1, *CVSid2; -const char *CVSid3="$Id: smartd.c,v 1.27 2002/10/24 15:25:27 ballen4705 Exp $" +const char *CVSid3="$Id: smartd.c,v 1.28 2002/10/24 15:29:05 ballen4705 Exp $" CVSID1 CVSID4 CVSID7; int daemon_init(void){ @@ -457,12 +457,15 @@ int main (int argc, char **argv){ } printhead(); - + + + // If we are running in background as a daemon, call + // a routines that forks then closes file descriptors. if (!debugmode){ daemon_init(); } - - /* fork into independent process */ + + // routines that look for devices on ata and scsi bus atadevicescan (atadevicesptr); scsidevicescan (scsidevicesptr); diff --git a/sm5/smartd.cpp b/sm5/smartd.cpp index 7640d330d016fa04cf3adb27c323c95c63fb9af7..995dbeab57b4a7c002fb38485c3ad650f2c1f75b 100644 --- a/sm5/smartd.cpp +++ b/sm5/smartd.cpp @@ -37,7 +37,7 @@ #include "ataprint.h" extern const char *CVSid1, *CVSid2; -const char *CVSid3="$Id: smartd.cpp,v 1.27 2002/10/24 15:25:27 ballen4705 Exp $" +const char *CVSid3="$Id: smartd.cpp,v 1.28 2002/10/24 15:29:05 ballen4705 Exp $" CVSID1 CVSID4 CVSID7; int daemon_init(void){ @@ -457,12 +457,15 @@ int main (int argc, char **argv){ } printhead(); - + + + // If we are running in background as a daemon, call + // a routines that forks then closes file descriptors. if (!debugmode){ daemon_init(); } - - /* fork into independent process */ + + // routines that look for devices on ata and scsi bus atadevicescan (atadevicesptr); scsidevicescan (scsidevicesptr);