mirror of
https://github.com/owntone/owntone-server.git
synced 2025-02-03 09:56:00 -05:00
Fix segfault on foreground on older redhats
This commit is contained in:
parent
ed0a9c9fb1
commit
86b87b43dd
16
src/main.c
16
src/main.c
@ -715,7 +715,7 @@ int main(int argc, char *argv[]) {
|
||||
pthread_t signal_tid;
|
||||
|
||||
int pid_fd;
|
||||
FILE *pid_fp;
|
||||
FILE *pid_fp=NULL;
|
||||
|
||||
config.use_mdns=1;
|
||||
err_debuglevel=1;
|
||||
@ -826,13 +826,15 @@ int main(int argc, char *argv[]) {
|
||||
}
|
||||
|
||||
|
||||
/* wait to for config.pid to be set by the signal handler */
|
||||
while(!config.pid) {
|
||||
sleep(1);
|
||||
}
|
||||
if(pid_fp) {
|
||||
/* wait to for config.pid to be set by the signal handler */
|
||||
while(!config.pid) {
|
||||
sleep(1);
|
||||
}
|
||||
|
||||
fprintf(pid_fp,"%d\n",config.pid);
|
||||
fclose(pid_fp);
|
||||
fprintf(pid_fp,"%d\n",config.pid);
|
||||
fclose(pid_fp);
|
||||
}
|
||||
|
||||
DPRINTF(E_LOG,L_MAIN|L_PL,"Loading playlists\n");
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user