aboutsummaryrefslogtreecommitdiffstats
path: root/search.c
diff options
context:
space:
mode:
authorFumitoshi UKAI <ukai@debian.or.jp>2002-01-17 10:29:14 +0000
committerFumitoshi UKAI <ukai@debian.or.jp>2002-01-17 10:29:14 +0000
commit0a3fcb8b74f6fdbdb210b245d282551d33c83a0f (patch)
treef4b294888d6eaa3cc755f5f96dd06f0cee3928e9 /search.c
parent[w3m-dev 02865] (diff)
downloadw3m-0a3fcb8b74f6fdbdb210b245d282551d33c83a0f.tar.gz
w3m-0a3fcb8b74f6fdbdb210b245d282551d33c83a0f.zip
[w3m-dev 02866]
* search.c: #include <signal.h> * search.c (open_migemo): ignore SIG_INT for migemo process * search.c (open_migemo): close_tty() * search.c (open_migemo): use execl() instead of system() From: Hironori Sakamoto <hsaka@mth.biglobe.ne.jp>
Diffstat (limited to 'search.c')
-rw-r--r--search.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/search.c b/search.c
index d5a7cac..1404828 100644
--- a/search.c
+++ b/search.c
@@ -1,6 +1,7 @@
-/* $Id: search.c,v 1.13 2002/01/17 09:26:33 ukai Exp $ */
+/* $Id: search.c,v 1.14 2002/01/17 10:29:14 ukai Exp $ */
#include "fm.h"
#include "regex.h"
+#include <signal.h>
#include <errno.h>
static void
@@ -42,12 +43,14 @@ open_migemo(char *migemo_command)
goto err2;
if (pid == 0) {
/* child */
+ signal(SIGINT, SIG_IGN);
+ close_tty();
close(fdr[0]);
close(fdw[1]);
dup2(fdw[0], 0);
dup2(fdr[1], 1);
close(2);
- system(migemo_command);
+ execl("/bin/sh", "sh", "-c", migemo_command, NULL);
exit(1);
}
close(fdr[1]);