git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky@559
7f574dfc-610e-0410-a909-
a81674777703
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;
}
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);