mirror of
https://github.com/owntone/owntone-server.git
synced 2025-04-17 17:39:56 -04: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;
|
pthread_t signal_tid;
|
||||||
|
|
||||||
int pid_fd;
|
int pid_fd;
|
||||||
FILE *pid_fp;
|
FILE *pid_fp=NULL;
|
||||||
|
|
||||||
config.use_mdns=1;
|
config.use_mdns=1;
|
||||||
err_debuglevel=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 */
|
if(pid_fp) {
|
||||||
while(!config.pid) {
|
/* wait to for config.pid to be set by the signal handler */
|
||||||
sleep(1);
|
while(!config.pid) {
|
||||||
}
|
sleep(1);
|
||||||
|
}
|
||||||
|
|
||||||
fprintf(pid_fp,"%d\n",config.pid);
|
fprintf(pid_fp,"%d\n",config.pid);
|
||||||
fclose(pid_fp);
|
fclose(pid_fp);
|
||||||
|
}
|
||||||
|
|
||||||
DPRINTF(E_LOG,L_MAIN|L_PL,"Loading playlists\n");
|
DPRINTF(E_LOG,L_MAIN|L_PL,"Loading playlists\n");
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user