summaryrefslogtreecommitdiff
path: root/cleopatre/application/libspid
diff options
context:
space:
mode:
authorCyril Jourdan2011-09-06 15:04:35 +0200
committerNicolas Schodet2011-12-20 15:42:45 +0100
commit86cdf655c4a786ecaab0f4143af688e28b16804e (patch)
treea20391552b065bf53b60309df0bf9e23a85fa8ba /cleopatre/application/libspid
parent5c48394204579eaa9378336e6794a63fb9ae18e7 (diff)
cleo/app/libspid: ignore non existent PID in file_update_warn, refs #2701
Diffstat (limited to 'cleopatre/application/libspid')
-rw-r--r--cleopatre/application/libspid/src/system.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/cleopatre/application/libspid/src/system.c b/cleopatre/application/libspid/src/system.c
index dcc40fb52c..ee5752bffa 100644
--- a/cleopatre/application/libspid/src/system.c
+++ b/cleopatre/application/libspid/src/system.c
@@ -815,8 +815,6 @@ libspid_system_file_update_is_registered (pid_t rx_pid, const char *filename,
* - LIBSPID_ERROR_PARAM if bad input parameters
* - LIBSPID_ERROR_SYSTEM if system error, see errno set by kill() system call:
* - EPERM in case of authorization constraints
- * - ESRCH if pid not found
- * - EINVAL if signal_nb < 0 or signal_nb >= NSIG
* - error from libspid_config_read_line()
*/
libspid_error_t
@@ -867,11 +865,14 @@ libspid_system_file_update_warn (pid_t tx_pid, const char *filename)
/* Check that rx_pid is different from the calling process.
* Note that if input tx_pid = 0, the calling process will also receive the signal. */
if ((0 != (rx_pid = atoi (elt[i])))
- && (tx_pid != rx_pid)
- && (0 != kill (rx_pid, SIGHUP)))
+ && (tx_pid != rx_pid))
{
- return LIBSPID_ERROR_SYSTEM;
+ if (kill (rx_pid, SIGHUP) != 0 && errno != ESRCH)
+ {
+ return LIBSPID_ERROR_SYSTEM;
+ }
}
+
}
return LIBSPID_SUCCESS;