aboutsummaryrefslogtreecommitdiffstats
path: root/search.c
diff options
context:
space:
mode:
authorFumitoshi UKAI <ukai@debian.or.jp>2003-01-17 16:57:17 +0000
committerFumitoshi UKAI <ukai@debian.or.jp>2003-01-17 16:57:17 +0000
commit439d2745a517b84993c2d8dc2eda8b168fe75d2b (patch)
treea8f3874bdc1d8cf72375c78fb35d332bf409e4fd /search.c
parentNEWS update (diff)
downloadw3m-439d2745a517b84993c2d8dc2eda8b168fe75d2b.tar.gz
w3m-439d2745a517b84993c2d8dc2eda8b168fe75d2b.zip
[w3m-dev 03646] setup child process, local CGI
* etc.c (reset_signals): static don't ignore SIGUSR1 (close_all_fds_except): static DEV_NULL_PATH (setup_child): added (myExec): rewrite (mySystem): rewrite * file.c (readHeader): check image_source (loadGeneralFile): check image_source (doExternal): use setup_child (_doFileCopy): use setup_child (doFileSave): use setup_child (uncompress_stream): check image_source use setup_child * image.c (getCharSize): no need stderr redirect (openImgdisplay): use setup_child (loadImage): use setup_child (getImageSize): no need stderr redirect * local.c (writeLocalCookie): check Local_cookie_file (localcgi_popen_rw): added (localcgi_popen_r): deleted (localcgi_post): rewrite (localcgi_get): deleted * proto.h (localcgi_get): defined by localcgi_post (reset_signals): deleted (close_all_fds_except): deleted (close_all_fds): deleted (setup_child): added * search.c (open_migemo): use setup_child, myExec * w3mimgdisplay.c (main): use DEV_NULL_PATH From: Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp>
Diffstat (limited to 'search.c')
-rw-r--r--search.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/search.c b/search.c
index 3706d05..e818597 100644
--- a/search.c
+++ b/search.c
@@ -1,4 +1,4 @@
-/* $Id: search.c,v 1.23 2002/12/18 16:33:19 ukai Exp $ */
+/* $Id: search.c,v 1.24 2003/01/17 16:57:20 ukai Exp $ */
#include "fm.h"
#include "regex.h"
#include <signal.h>
@@ -50,17 +50,13 @@ open_migemo(char *migemo_command)
goto err2;
if (migemo_pid == 0) {
/* child */
- reset_signals();
- SETPGRP();
- close_tty();
close(fdr[0]);
close(fdw[1]);
dup2(fdw[0], 0);
dup2(fdr[1], 1);
- close_all_fds(2);
- execl("/bin/sh", "sh", "-c", migemo_command, NULL);
- /* XXX: ifndef HAVE_SETPGRP, use "start /f"? */
- exit(1);
+ setup_child(FALSE, 2, -1);
+ myExec(migemo_command);
+ /* XXX: ifdef __EMX__, use start /f ? */
}
close(fdr[1]);
close(fdw[0]);