Skip to content
Snippets Groups Projects
Commit e09f4f81 authored by ballen4705's avatar ballen4705
Browse files

Close syslog after each write -- prevents daemon from having another open

file descriptor


git-svn-id: https://smartmontools.svn.sourceforge.net/svnroot/smartmontools/trunk@140 4ea69e1a-61f1-4043-bf83-b5c94c648137
parent 0e6678e5
No related branches found
No related tags found
No related merge requests found
......@@ -39,7 +39,7 @@
// CVS ID strings
extern const char *CVSid1, *CVSid2;
const char *CVSid3="$Id: smartd.c,v 1.34 2002/10/26 09:58:05 ballen4705 Exp $"
const char *CVSid3="$Id: smartd.c,v 1.35 2002/10/26 10:19:16 ballen4705 Exp $"
CVSID1 CVSID4 CVSID7;
// This function prints either to stdout or to the syslog as needed
......@@ -51,6 +51,7 @@ void printout(int priority,char *fmt, ...){
vprintf(fmt,ap);
else
vsyslog(priority,fmt,ap);
closelog();
va_end(ap);
return;
}
......
......@@ -39,7 +39,7 @@
// CVS ID strings
extern const char *CVSid1, *CVSid2;
const char *CVSid3="$Id: smartd.cpp,v 1.34 2002/10/26 09:58:05 ballen4705 Exp $"
const char *CVSid3="$Id: smartd.cpp,v 1.35 2002/10/26 10:19:16 ballen4705 Exp $"
CVSID1 CVSID4 CVSID7;
// This function prints either to stdout or to the syslog as needed
......@@ -51,6 +51,7 @@ void printout(int priority,char *fmt, ...){
vprintf(fmt,ap);
else
vsyslog(priority,fmt,ap);
closelog();
va_end(ap);
return;
}
......
......@@ -23,7 +23,7 @@
*/
#ifndef CVSID7
#define CVSID7 "$Id: smartd.h,v 1.10 2002/10/26 09:38:26 ballen4705 Exp $\n"
#define CVSID7 "$Id: smartd.h,v 1.11 2002/10/26 10:19:16 ballen4705 Exp $\n"
#endif
// Configuration file
......@@ -31,13 +31,15 @@
#define MAXLINELEN 114
#define MAXENTRIES 64
// BAD PROGRAMMING PRACTICE - GLOBAL VARIABLES SHOULD BE IN .c NOT .h
// FILE
// BAD PROGRAMMING - GLOBAL VARIABLES SHOULD BE IN .c NOT .h FILE
/* how often SMART status is checked, in seconds */
int checktime = 1800;
// number of ATA and SCSI devices being watched
int numatadevices;
int numscsidevices;
#define MAXATADEVICES 12
#define MAXSCSIDEVICES 26
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment