mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-11-17 18:45:10 +00:00
fork fix
git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky@542 7f574dfc-610e-0410-a909-a81674777703
This commit is contained in:
parent
d265a2d05a
commit
a72572328f
@ -5,6 +5,7 @@
|
|||||||
http://bugs.gentoo.org/show_bug.cgi?id=122637#c3
|
http://bugs.gentoo.org/show_bug.cgi?id=122637#c3
|
||||||
* Stop using override_redirect true -- conky back under WM control
|
* Stop using override_redirect true -- conky back under WM control
|
||||||
when using 'own_window yes'.
|
when using 'own_window yes'.
|
||||||
|
* Fixed texeci breakage when forking to background is on
|
||||||
|
|
||||||
2006-02-14
|
2006-02-14
|
||||||
* Drastically simplified own_window=yes window creation code.
|
* Drastically simplified own_window=yes window creation code.
|
||||||
|
40
src/conky.c
40
src/conky.c
@ -5586,6 +5586,26 @@ int main(int argc, char **argv)
|
|||||||
free(text);
|
free(text);
|
||||||
}
|
}
|
||||||
text = NULL;
|
text = NULL;
|
||||||
|
/* fork */
|
||||||
|
if (fork_to_background) {
|
||||||
|
int ret = fork();
|
||||||
|
switch (ret) {
|
||||||
|
case -1:
|
||||||
|
ERR("can't fork() to background: %s",
|
||||||
|
strerror(errno));
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 0:
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
fprintf
|
||||||
|
(stderr,
|
||||||
|
"Conky: forked to background, pid is %d\n",
|
||||||
|
ret);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
update_uname();
|
update_uname();
|
||||||
|
|
||||||
@ -5623,26 +5643,6 @@ int main(int argc, char **argv)
|
|||||||
draw_stuff();
|
draw_stuff();
|
||||||
#endif /* X11 */
|
#endif /* X11 */
|
||||||
|
|
||||||
/* fork */
|
|
||||||
if (fork_to_background) {
|
|
||||||
int ret = fork();
|
|
||||||
switch (ret) {
|
|
||||||
case -1:
|
|
||||||
ERR("can't fork() to background: %s",
|
|
||||||
strerror(errno));
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 0:
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
fprintf
|
|
||||||
(stderr,
|
|
||||||
"Conky: forked to background, pid is %d\n",
|
|
||||||
ret);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Set signal handlers */
|
/* Set signal handlers */
|
||||||
act.sa_handler = signal_handler;
|
act.sa_handler = signal_handler;
|
||||||
|
Loading…
Reference in New Issue
Block a user