diff options
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); } |