From 6806b4883077745c3f288cfe679181a61849f97f Mon Sep 17 00:00:00 2001 From: David Zeuthen Date: Wed, 12 Aug 2009 11:51:52 -0400 Subject: [PATCH] Don't set the GError if the process doesn't exist --- src/polkit/polkitunixprocess.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/polkit/polkitunixprocess.c b/src/polkit/polkitunixprocess.c index a3813c2..d559a4f 100644 --- a/src/polkit/polkitunixprocess.c +++ b/src/polkit/polkitunixprocess.c @@ -354,7 +354,7 @@ polkit_unix_process_exists_sync (PolkitSubject *subject, start_time = get_start_time_for_pid (process->pid, &local_error); if (local_error != NULL) { - g_propagate_error (error, local_error); + /* Don't propagate the error - it just means there is no process with this pid */ g_error_free (local_error); ret = FALSE; } @@ -363,11 +363,6 @@ polkit_unix_process_exists_sync (PolkitSubject *subject, if (start_time != process->start_time) { ret = FALSE; - g_set_error (error, - POLKIT_ERROR, - POLKIT_ERROR_FAILED, - "Start times for pid %d do not match", - (gint) process->pid); } } -- 2.7.4