commit 8ac071a
Merge pull request 'this is actually a pipe not a file, it should be closed as a pipe' (#6) from themusicgod1/snac2:master into master Reviewed-on: https://codeberg.org/grunfink/snac2/pulls/6
1 files changed,
+3,
-3
+3,
-3
1@@ -1017,10 +1017,10 @@ void process_queue(snac *snac)
2 FILE *f;
3 int ok = 0;
4
5- if ((f = popen("/usr/sbin/sendmail -t", "w")) != NULL) {
6+ f = popen("/usr/sbin/sendmail -t", "w");
7+ if (f) {
8 fprintf(f, "%s\n", msg);
9-
10- if (fclose(f) != EOF)
11+ if (pclose(f) != EOF) //this is a pipe stream not just a file
12 ok = 1;
13 }
14