1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-11-18 02:55:12 +00:00

give parent a sec to terminate

git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky@559 7f574dfc-610e-0410-a909-a81674777703
This commit is contained in:
Philip Kovacs 2006-03-07 20:35:11 +00:00
parent d7b85bbf02
commit 12c36bd8d9
2 changed files with 9 additions and 8 deletions

View File

@ -5640,21 +5640,22 @@ int main(int argc, char **argv)
text = NULL;
/* fork */
if (fork_to_background) {
int ret = fork();
switch (ret) {
int pid = fork();
switch (pid) {
case -1:
ERR("can't fork() to background: %s",
strerror(errno));
break;
case 0:
/* child process */
sleep(1);
fprintf(stderr,"\n");fflush(stderr);
break;
default:
fprintf
(stderr,
"Conky: forked to background, pid is %d\n",
ret);
/* parent process */
fprintf(stderr,"Conky: forked to background, pid is %d\n",pid);
fflush(stderr);
return 0;
}

View File

@ -151,9 +151,9 @@ static Window find_desktop_window(Window *p_root, Window *p_desktop)
if (win != root)
fprintf(stderr,
"\nConky: desktop window (%lx) is subwindow of root window (%lx)\n",win,root);
"Conky: desktop window (%lx) is subwindow of root window (%lx)\n",win,root);
else
fprintf(stderr, "\nConky: desktop window (%lx) is root window\n",win);
fprintf(stderr, "Conky: desktop window (%lx) is root window\n",win);
fflush(stderr);