summaryrefslogtreecommitdiff
path: root/mate-session
diff options
context:
space:
mode:
Diffstat (limited to 'mate-session')
-rw-r--r--mate-session/gsm-manager.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/mate-session/gsm-manager.c b/mate-session/gsm-manager.c
index f76c235..96205b1 100644
--- a/mate-session/gsm-manager.c
+++ b/mate-session/gsm-manager.c
@@ -1035,7 +1035,10 @@ process_is_running (const char * name)
int num_processes;
char * command = g_strdup_printf ("pidof %s | wc -l", name);
FILE *fp = popen(command, "r");
- fscanf(fp, "%d", &num_processes);
+
+ if (fscanf(fp, "%d", &num_processes) != 1)
+ num_processes = 0;
+
pclose(fp);
g_free (command);