commit 8936340
Anonymous
·
2022-11-30 23:10:35 +0000 UTC
parent 2a5f105
this is actually a pipe not a file, it should be closed as a pipe
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