diff options
author | Fumitoshi UKAI <ukai@debian.or.jp> | 2003-01-15 16:17:11 +0000 |
---|---|---|
committer | Fumitoshi UKAI <ukai@debian.or.jp> | 2003-01-15 16:17:11 +0000 |
commit | 76cac853891ec4bfb776178e361a25093365f45a (patch) | |
tree | d27cdca3883a507128a9402f4fbcaaea4beda17d /local.c | |
parent | [w3m-dev 03641] Re: cleanup (don't close connection of news server) (diff) | |
download | w3m-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.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -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); } |