From b3c4088e42cb2b9cfecaa35304188c1fa6f6da0c Mon Sep 17 00:00:00 2001 From: Craig Small Date: Wed, 4 Jan 2006 01:37:13 +0000 Subject: [PATCH] more error checking on fuser kill --- src/fuser.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/fuser.c b/src/fuser.c index da307d7..b6f523a 100644 --- a/src/fuser.c +++ b/src/fuser.c @@ -1167,6 +1167,12 @@ static void kill_matched_proc(struct procs *proc_head, const opt_type opts, cons for (pptr = proc_head ; pptr != NULL ; pptr = pptr->next ) { if ( (opts & OPT_INTERACTIVE) && (ask(pptr->pid) == 0)) continue; - kill (pptr->pid, sig_number); + if ( kill (pptr->pid, sig_number) < 0) { + fprintf(stderr, _("Could not kill process %d: %s\n"), + pptr->pid, + strerror(errno) + ); + } + } } -- 2.50.1