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
36
37
38
39
40
41
42
43
44
45
|
$NetBSD: patch-aa,v 1.4 2016/06/07 22:54:29 youri Exp $
--- main.c.orig 2005-05-09 01:14:32.000000000 +0000
+++ main.c
@@ -85,11 +85,17 @@ SOFTWARE.
#include <pwd.h>
#include <ctype.h>
+#include <termios.h>
#include <data.h>
#include <error.h>
#include <menu.h>
+#include <utmp.h>
+#if !defined(__DragonFly__)
+#include <utmpx.h>
+#endif
+
#ifdef AMOEBA
#include <amoeba.h>
#include <cmdreg.h>
@@ -3284,13 +3290,21 @@ spawn (void)
#endif
ioctl(0, TIOCSPGRP, (char *)&pgrp);
#ifndef __osf__
+#ifdef __APPLE__
+ setpgid(0,0);
+#else
setpgrp(0,0);
+#endif
#else
setpgid(0,0);
#endif
close(open(ttydev, O_WRONLY, 0));
-#ifndef __osf__
+#ifndef __osf__
+#ifdef __APPLE__
+ setpgid (0, pgrp);
+#else
setpgrp (0, pgrp);
+#endif
#else
setpgid (0, pgrp);
#endif
|