1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
$NetBSD: patch-ab,v 1.12 2012/05/30 06:42:34 wiz Exp $
First chunk: adapt for gc-7.2 API change.
Second chunk: suspend the job w3m belongs to, not w3m only.
--- main.c.orig 2011-01-04 09:42:19.000000000 +0000
+++ main.c
@@ -833,7 +833,8 @@ main(int argc, char **argv, char **envp)
mySignal(SIGPIPE, SigPipe);
#endif
- orig_GC_warn_proc = GC_set_warn_proc(wrap_GC_warn_proc);
+ orig_GC_warn_proc = GC_get_warn_proc();
+ GC_set_warn_proc(wrap_GC_warn_proc);
err_msg = Strnew();
if (load_argc == 0) {
/* no URL specified */
@@ -2517,7 +2518,17 @@ DEFUN(susp, INTERRUPT SUSPEND, "Stop loa
shell = "/bin/sh";
system(shell);
#else /* SIGSTOP */
+#ifdef SIGTSTP
+ signal(SIGTSTP, SIG_DFL); /* just in case */
+ /*
+ * Note: If susp() was called from SIGTSTP handler,
+ * unblocking SIGTSTP would be required here.
+ * Currently not.
+ */
+ kill(0, SIGTSTP); /* stop whole job, not a single process */
+#else
kill((pid_t) 0, SIGSTOP);
+#endif
#endif /* SIGSTOP */
fmInit();
displayBuffer(Currentbuf, B_FORCE_REDRAW);
|