blob: 4af3ae69ecb45684f213f2cad399160b4a6f5630 (
plain)
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
|
$NetBSD: patch-ab,v 1.14 2016/11/06 19:30:42 wiz Exp $
Suspend the job w3m belongs to, not w3m only.
https://github.com/tats/w3m/pull/34
--- main.c.orig 2016-10-31 11:28:45.000000000 +0000
+++ main.c
@@ -2619,7 +2620,17 @@ DEFUN(susp, INTERRUPT SUSPEND, "Suspend
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);
|