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:
parent
d7b85bbf02
commit
12c36bd8d9
13
src/conky.c
13
src/conky.c
@ -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;
|
||||
}
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user