snac2

Fork of https://codeberg.org/grunfink/snac2
git clone https://git.inz.fi/snac2
Log | Files | Refs | README | LICENSE

commit 893634027f4bb13dd3ef34ef7a5d71e6af17f5c9
parent 2a5f10583b98cbf9aa094a244c021c8fee9e905e
Author: Anonymous <anon@nowhere.com>
Date:   Wed, 30 Nov 2022 17:10:35 -0600

this is actually a pipe not a file, it should be closed as a pipe

Diffstat:
Mactivitypub.c | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/activitypub.c b/activitypub.c @@ -1017,10 +1017,10 @@ void process_queue(snac *snac) FILE *f; int ok = 0; - if ((f = popen("/usr/sbin/sendmail -t", "w")) != NULL) { + f = popen("/usr/sbin/sendmail -t", "w"); + if (f) { fprintf(f, "%s\n", msg); - - if (fclose(f) != EOF) + if (pclose(f) != EOF) //this is a pipe stream not just a file ok = 1; }