1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2025-01-27 09:08:25 +00:00

SIGUSR1 fix on freebsd and linux

git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@738 7f574dfc-610e-0410-a909-a81674777703
This commit is contained in:
Philip Kovacs 2006-11-08 03:06:42 +00:00
parent 2d4ba18b27
commit 9bbdaa03c5
2 changed files with 3 additions and 3 deletions

View File

@ -289,7 +289,8 @@ update_cpu_usage()
long cp_time[CPUSTATES];
size_t len = sizeof (cp_time);
if (cpu_setup == 0) {
/* add check for !info.cpu_usage since that mem is freed on a SIGUSR1 */
if ((cpu_setup == 0)) || (!info.cpu_usage) {
get_cpu_count();
cpu_setup = 1;
}

View File

@ -405,8 +405,7 @@ inline static void update_stat()
unsigned int malloc_cpu_size=0;
/* added check for !info.cpu_usage since that mem is freed on a SIGUSR1
* and linux.c was assuming it ws still allocated, leading to a sigsegv */
/* add check for !info.cpu_usage since that mem is freed on a SIGUSR1 */
if (!cpu_setup || !info.cpu_usage) {
get_cpu_count();
cpu_setup = 1;