Skip to content
Snippets Groups Projects
Commit b04d31fa authored by deuce's avatar deuce
Browse files

Fix weirdness with NetBSD by renaming pidfile to pidf.

parent 58c71758
No related branches found
No related tags found
No related merge requests found
...@@ -124,8 +124,7 @@ gid_t old_gid; ...@@ -124,8 +124,7 @@ gid_t old_gid;
BOOL is_daemon=FALSE; BOOL is_daemon=FALSE;
char daemon_type[2]; char daemon_type[2];
BOOL std_facilities=FALSE; BOOL std_facilities=FALSE;
FILE* pidfile; FILE * pidf;
#endif #endif
static const char* prompt; static const char* prompt;
...@@ -870,9 +869,9 @@ static void handle_sigs(void) { ...@@ -870,9 +869,9 @@ static void handle_sigs(void) {
/* Write the standard .pid file if running as a daemon */ /* Write the standard .pid file if running as a daemon */
/* Must be here so signals are sent to the correct thread */ /* Must be here so signals are sent to the correct thread */
if(pidfile!=NULL) { if(pidf!=NULL) {
fprintf(pidfile,"%d",getpid()); fprintf(pidf,"%d",getpid());
fclose(pidfile); fclose(pidf);
} }
} }
...@@ -1473,7 +1472,7 @@ int main(int argc, char** argv) ...@@ -1473,7 +1472,7 @@ int main(int argc, char** argv)
} }
/* Open here to use startup permissions to create the file */ /* Open here to use startup permissions to create the file */
pidfile=fopen(SBBS_PID_FILE,"w"); pidf=fopen(SBBS_PID_FILE,"w");
} }
old_uid = getuid(); old_uid = getuid();
if((pw_entry=getpwnam(new_uid_name))!=0) if((pw_entry=getpwnam(new_uid_name))!=0)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment