]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
Monitor: use pclose rather than fclose
authorNeilBrown <neilb@suse.de>
Fri, 10 Jul 2009 04:39:20 +0000 (14:39 +1000)
committerNeilBrown <neilb@suse.de>
Fri, 10 Jul 2009 04:39:20 +0000 (14:39 +1000)
Using pclose is probably the right thing to do seeing that we
used popen, but as there is no clear need to wait for sendmail
to finish, it isn't really important.

Signed-off-by: NeilBrown <neilb@suse.de>
Monitor.c

index f6fd95cdfa9401c9bef67bdefd3403f8a3a5e852..af486d709c63d2a96d23803c47c3e7078ab71143 100644 (file)
--- a/Monitor.c
+++ b/Monitor.c
@@ -581,7 +581,7 @@ static void alert(char *event, char *dev, char *disc, char *mailaddr, char *mail
                                        n=fwrite(buf, 1, n, mp); /* yes, i don't care about the result */
                                fclose(mdstat);
                        }
-                       fclose(mp);
+                       pclose(mp);
                }
 
        }