commit b84270d63e5e405932e38fcd500b0be8bfa59edc
parent 7cbc29f71e7b5d3b8c10c3f1fc42bc1fb3d4cbc6
Author: ukai <ukai>
Date: Wed, 15 Jan 2003 16:17:11 +0000
[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:
2 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/ChangeLog b/ChangeLog
@@ -1,5 +1,10 @@
2003-01-16 Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp>
+ * [w3m-dev 03642] Re: cleanup (don't close connection of news server)
+ * local.c (localcgi_post): localcgi_popen_r first
+
+2003-01-16 Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp>
+
* [w3m-dev 03641] Re: cleanup (don't close connection of news server)
* ftp.c (ftp_command): fix fwrite arg
* news.c (news_command): fix fwrite arg
diff --git a/local.c b/local.c
@@ -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);
}