aboutsummaryrefslogtreecommitdiffstats
path: root/local.c
diff options
context:
space:
mode:
authorFumitoshi UKAI <ukai@debian.or.jp>2003-01-15 16:17:11 +0000
committerFumitoshi UKAI <ukai@debian.or.jp>2003-01-15 16:17:11 +0000
commit76cac853891ec4bfb776178e361a25093365f45a (patch)
treed27cdca3883a507128a9402f4fbcaaea4beda17d /local.c
parent[w3m-dev 03641] Re: cleanup (don't close connection of news server) (diff)
downloadw3m-76cac853891ec4bfb776178e361a25093365f45a.tar.gz
w3m-76cac853891ec4bfb776178e361a25093365f45a.zip
[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>
Diffstat (limited to 'local.c')
-rw-r--r--local.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/local.c b/local.c
index 17e1b64..82fa748 100644
--- a/local.c
+++ b/local.c
@@ -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);
}