commit 09a8d1f9866c896962e0ef1dc86baf25b4220cf4
parent 0fd6a658f96b3ae5d0a372482c0e2cb9b7e1d71a
Author: ukai <ukai>
Date: Thu, 17 Jan 2002 10:29:14 +0000
[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:
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
@@ -1,5 +1,13 @@
2002-01-17 Hironori Sakamoto <hsaka@mth.biglobe.ne.jp>
+ * [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()
+
+2002-01-17 Hironori Sakamoto <hsaka@mth.biglobe.ne.jp>
+
* [w3m-dev 02865]
* search.c (open_migemo): add flush_tty()
diff --git a/search.c b/search.c
@@ -1,6 +1,7 @@
/* $Id$ */
#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]);