1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-11-15 09:44:04 +00:00

Merge branch '1.8.0' into 1.8.1

Conflicts:
	src/conky.c
This commit is contained in:
Brenden Matthews 2010-01-26 13:05:59 -08:00
commit c5925930c3

View File

@ -353,6 +353,10 @@ static unsigned long total_run_times;
/* fork? */
static int fork_to_background;
/* set to 0 after the first time conky is run, so we don't fork again after the
* first forking */
static int first_pass = 1;
static int cpu_avg_samples, net_avg_samples, diskio_avg_samples;
/* filenames for output */
@ -5678,7 +5682,7 @@ void initialisation(int argc, char **argv) {
break;
#endif /* X11 */
case 'p':
if (startup_pause == 0) {
if (first_pass) {
startup_pause = atoi(optarg);
sleep(startup_pause);
}
@ -5704,7 +5708,7 @@ void initialisation(int argc, char **argv) {
}
global_text = NULL;
/* fork */
if (fork_to_background) {
if (fork_to_background && first_pass) {
int pid = fork();
switch (pid) {
@ -5912,6 +5916,8 @@ int main(int argc, char **argv)
initialisation(argc, argv);
first_pass = 0; /* don't ever call fork() again */
main_loop();
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)