[w3m-dev 03642] Re: cleanup (don't close connection of news server)

* local.c (localcgi_post): localcgi_popen_r first
From: Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp>
This commit is contained in:
Fumitoshi UKAI
2003-01-15 16:17:11 +00:00
parent 9e49e56287
commit 76cac85389
2 changed files with 12 additions and 7 deletions

12
local.c
View File

@@ -1,4 +1,4 @@
/* $Id: local.c,v 1.18 2003/01/15 16:11:43 ukai Exp $ */
/* $Id: local.c,v 1.19 2003/01/15 16:17:11 ukai Exp $ */
#include "fm.h"
#include <string.h>
#include <stdio.h>
@@ -396,13 +396,13 @@ localcgi_post(char *uri, char *qstr, FormList *request, char *referer)
if (check_local_cgi(file, status) < 0)
return NULL;
tmp1 = tmpfname(TMPF_DFL, NULL);
if ((pid = localcgi_popen_r(&f)) < 0)
return NULL;
else if (pid)
return f;
f1 = fopen(tmp1->ptr, "w");
if (f1 == NULL)
return NULL;
if ((pid = localcgi_popen_r(&f))) {
fclose(f1);
return pid > 0 ? f : NULL;
}
exit(1);
if (qstr == NULL) {
set_cgi_environ(uri, file, uri);
}