author | jurikm |
Sun, 12 Feb 2012 14:04:10 +0000 | |
changeset 8245 | 383896da4129 |
parent 3509 | 42b6937bbc52 |
permissions | -rw-r--r-- |
3509
42b6937bbc52
SFEurxvt.spec: bump to 9.11, add Patch16 initialize rows/columns, (Build)Requires SUNWgcc<|runtime> is sufficient
tom68
parents:
diff
changeset
|
1 |
diff --git a/src/ptytty.C b/src/ptytty.C |
42b6937bbc52
SFEurxvt.spec: bump to 9.11, add Patch16 initialize rows/columns, (Build)Requires SUNWgcc<|runtime> is sufficient
tom68
parents:
diff
changeset
|
2 |
index 73f44fb..cd1f53c 100644 |
42b6937bbc52
SFEurxvt.spec: bump to 9.11, add Patch16 initialize rows/columns, (Build)Requires SUNWgcc<|runtime> is sufficient
tom68
parents:
diff
changeset
|
3 |
--- a/src/ptytty.C |
42b6937bbc52
SFEurxvt.spec: bump to 9.11, add Patch16 initialize rows/columns, (Build)Requires SUNWgcc<|runtime> is sufficient
tom68
parents:
diff
changeset
|
4 |
+++ b/src/ptytty.C |
42b6937bbc52
SFEurxvt.spec: bump to 9.11, add Patch16 initialize rows/columns, (Build)Requires SUNWgcc<|runtime> is sufficient
tom68
parents:
diff
changeset
|
5 |
@@ -200,34 +200,6 @@ control_tty (int fd_tty) |
42b6937bbc52
SFEurxvt.spec: bump to 9.11, add Patch16 initialize rows/columns, (Build)Requires SUNWgcc<|runtime> is sufficient
tom68
parents:
diff
changeset
|
6 |
|
42b6937bbc52
SFEurxvt.spec: bump to 9.11, add Patch16 initialize rows/columns, (Build)Requires SUNWgcc<|runtime> is sufficient
tom68
parents:
diff
changeset
|
7 |
setsid (); |
42b6937bbc52
SFEurxvt.spec: bump to 9.11, add Patch16 initialize rows/columns, (Build)Requires SUNWgcc<|runtime> is sufficient
tom68
parents:
diff
changeset
|
8 |
|
42b6937bbc52
SFEurxvt.spec: bump to 9.11, add Patch16 initialize rows/columns, (Build)Requires SUNWgcc<|runtime> is sufficient
tom68
parents:
diff
changeset
|
9 |
-#if defined(HAVE_DEV_PTMX) && defined(I_PUSH) |
42b6937bbc52
SFEurxvt.spec: bump to 9.11, add Patch16 initialize rows/columns, (Build)Requires SUNWgcc<|runtime> is sufficient
tom68
parents:
diff
changeset
|
10 |
- /* |
42b6937bbc52
SFEurxvt.spec: bump to 9.11, add Patch16 initialize rows/columns, (Build)Requires SUNWgcc<|runtime> is sufficient
tom68
parents:
diff
changeset
|
11 |
- * Push STREAMS modules: |
42b6937bbc52
SFEurxvt.spec: bump to 9.11, add Patch16 initialize rows/columns, (Build)Requires SUNWgcc<|runtime> is sufficient
tom68
parents:
diff
changeset
|
12 |
- * ptem: pseudo-terminal hardware emulation module. |
42b6937bbc52
SFEurxvt.spec: bump to 9.11, add Patch16 initialize rows/columns, (Build)Requires SUNWgcc<|runtime> is sufficient
tom68
parents:
diff
changeset
|
13 |
- * ldterm: standard terminal line discipline. |
42b6937bbc52
SFEurxvt.spec: bump to 9.11, add Patch16 initialize rows/columns, (Build)Requires SUNWgcc<|runtime> is sufficient
tom68
parents:
diff
changeset
|
14 |
- * ttcompat: V7, 4BSD and XENIX STREAMS compatibility module. |
42b6937bbc52
SFEurxvt.spec: bump to 9.11, add Patch16 initialize rows/columns, (Build)Requires SUNWgcc<|runtime> is sufficient
tom68
parents:
diff
changeset
|
15 |
- * |
42b6937bbc52
SFEurxvt.spec: bump to 9.11, add Patch16 initialize rows/columns, (Build)Requires SUNWgcc<|runtime> is sufficient
tom68
parents:
diff
changeset
|
16 |
- * After we push the STREAMS modules, the first open () on the slave side |
42b6937bbc52
SFEurxvt.spec: bump to 9.11, add Patch16 initialize rows/columns, (Build)Requires SUNWgcc<|runtime> is sufficient
tom68
parents:
diff
changeset
|
17 |
- * (i.e. the next section between the dashes giving us "tty opened OK") |
42b6937bbc52
SFEurxvt.spec: bump to 9.11, add Patch16 initialize rows/columns, (Build)Requires SUNWgcc<|runtime> is sufficient
tom68
parents:
diff
changeset
|
18 |
- * should make the "ptem" (or "ldterm" depending upon either which OS |
42b6937bbc52
SFEurxvt.spec: bump to 9.11, add Patch16 initialize rows/columns, (Build)Requires SUNWgcc<|runtime> is sufficient
tom68
parents:
diff
changeset
|
19 |
- * version or which set of manual pages you have) module give us a |
42b6937bbc52
SFEurxvt.spec: bump to 9.11, add Patch16 initialize rows/columns, (Build)Requires SUNWgcc<|runtime> is sufficient
tom68
parents:
diff
changeset
|
20 |
- * controlling terminal. We must already have close ()d the master side |
42b6937bbc52
SFEurxvt.spec: bump to 9.11, add Patch16 initialize rows/columns, (Build)Requires SUNWgcc<|runtime> is sufficient
tom68
parents:
diff
changeset
|
21 |
- * fd in this child process before we push STREAMS modules on because the |
42b6937bbc52
SFEurxvt.spec: bump to 9.11, add Patch16 initialize rows/columns, (Build)Requires SUNWgcc<|runtime> is sufficient
tom68
parents:
diff
changeset
|
22 |
- * documentation is really unclear about whether it is any close () on |
42b6937bbc52
SFEurxvt.spec: bump to 9.11, add Patch16 initialize rows/columns, (Build)Requires SUNWgcc<|runtime> is sufficient
tom68
parents:
diff
changeset
|
23 |
- * the master side or the last close () - i.e. a proper STREAMS dismantling |
42b6937bbc52
SFEurxvt.spec: bump to 9.11, add Patch16 initialize rows/columns, (Build)Requires SUNWgcc<|runtime> is sufficient
tom68
parents:
diff
changeset
|
24 |
- * close () - on the master side which causes a hang up to be sent |
42b6937bbc52
SFEurxvt.spec: bump to 9.11, add Patch16 initialize rows/columns, (Build)Requires SUNWgcc<|runtime> is sufficient
tom68
parents:
diff
changeset
|
25 |
- * through - Geoff Wing |
42b6937bbc52
SFEurxvt.spec: bump to 9.11, add Patch16 initialize rows/columns, (Build)Requires SUNWgcc<|runtime> is sufficient
tom68
parents:
diff
changeset
|
26 |
- */ |
42b6937bbc52
SFEurxvt.spec: bump to 9.11, add Patch16 initialize rows/columns, (Build)Requires SUNWgcc<|runtime> is sufficient
tom68
parents:
diff
changeset
|
27 |
-#if defined(HAVE_ISASTREAM) && defined(HAVE_STROPTS_H) |
42b6937bbc52
SFEurxvt.spec: bump to 9.11, add Patch16 initialize rows/columns, (Build)Requires SUNWgcc<|runtime> is sufficient
tom68
parents:
diff
changeset
|
28 |
- if (isastream (fd_tty) == 1) |
42b6937bbc52
SFEurxvt.spec: bump to 9.11, add Patch16 initialize rows/columns, (Build)Requires SUNWgcc<|runtime> is sufficient
tom68
parents:
diff
changeset
|
29 |
-# endif |
42b6937bbc52
SFEurxvt.spec: bump to 9.11, add Patch16 initialize rows/columns, (Build)Requires SUNWgcc<|runtime> is sufficient
tom68
parents:
diff
changeset
|
30 |
- { |
42b6937bbc52
SFEurxvt.spec: bump to 9.11, add Patch16 initialize rows/columns, (Build)Requires SUNWgcc<|runtime> is sufficient
tom68
parents:
diff
changeset
|
31 |
- ioctl (fd_tty, I_PUSH, "ptem"); |
42b6937bbc52
SFEurxvt.spec: bump to 9.11, add Patch16 initialize rows/columns, (Build)Requires SUNWgcc<|runtime> is sufficient
tom68
parents:
diff
changeset
|
32 |
- ioctl (fd_tty, I_PUSH, "ldterm"); |
42b6937bbc52
SFEurxvt.spec: bump to 9.11, add Patch16 initialize rows/columns, (Build)Requires SUNWgcc<|runtime> is sufficient
tom68
parents:
diff
changeset
|
33 |
- ioctl (fd_tty, I_PUSH, "ttcompat"); |
42b6937bbc52
SFEurxvt.spec: bump to 9.11, add Patch16 initialize rows/columns, (Build)Requires SUNWgcc<|runtime> is sufficient
tom68
parents:
diff
changeset
|
34 |
- } |
42b6937bbc52
SFEurxvt.spec: bump to 9.11, add Patch16 initialize rows/columns, (Build)Requires SUNWgcc<|runtime> is sufficient
tom68
parents:
diff
changeset
|
35 |
-#endif |
42b6937bbc52
SFEurxvt.spec: bump to 9.11, add Patch16 initialize rows/columns, (Build)Requires SUNWgcc<|runtime> is sufficient
tom68
parents:
diff
changeset
|
36 |
- |
42b6937bbc52
SFEurxvt.spec: bump to 9.11, add Patch16 initialize rows/columns, (Build)Requires SUNWgcc<|runtime> is sufficient
tom68
parents:
diff
changeset
|
37 |
#ifdef TIOCSCTTY |
42b6937bbc52
SFEurxvt.spec: bump to 9.11, add Patch16 initialize rows/columns, (Build)Requires SUNWgcc<|runtime> is sufficient
tom68
parents:
diff
changeset
|
38 |
ioctl (fd_tty, TIOCSCTTY, NULL); |
42b6937bbc52
SFEurxvt.spec: bump to 9.11, add Patch16 initialize rows/columns, (Build)Requires SUNWgcc<|runtime> is sufficient
tom68
parents:
diff
changeset
|
39 |
#else |
42b6937bbc52
SFEurxvt.spec: bump to 9.11, add Patch16 initialize rows/columns, (Build)Requires SUNWgcc<|runtime> is sufficient
tom68
parents:
diff
changeset
|
40 |
@@ -375,6 +347,34 @@ ptytty_unix::get () |
42b6937bbc52
SFEurxvt.spec: bump to 9.11, add Patch16 initialize rows/columns, (Build)Requires SUNWgcc<|runtime> is sufficient
tom68
parents:
diff
changeset
|
41 |
} |
42b6937bbc52
SFEurxvt.spec: bump to 9.11, add Patch16 initialize rows/columns, (Build)Requires SUNWgcc<|runtime> is sufficient
tom68
parents:
diff
changeset
|
42 |
} |
42b6937bbc52
SFEurxvt.spec: bump to 9.11, add Patch16 initialize rows/columns, (Build)Requires SUNWgcc<|runtime> is sufficient
tom68
parents:
diff
changeset
|
43 |
|
42b6937bbc52
SFEurxvt.spec: bump to 9.11, add Patch16 initialize rows/columns, (Build)Requires SUNWgcc<|runtime> is sufficient
tom68
parents:
diff
changeset
|
44 |
+#if defined(HAVE_DEV_PTMX) && defined(I_PUSH) |
42b6937bbc52
SFEurxvt.spec: bump to 9.11, add Patch16 initialize rows/columns, (Build)Requires SUNWgcc<|runtime> is sufficient
tom68
parents:
diff
changeset
|
45 |
+ /* |
42b6937bbc52
SFEurxvt.spec: bump to 9.11, add Patch16 initialize rows/columns, (Build)Requires SUNWgcc<|runtime> is sufficient
tom68
parents:
diff
changeset
|
46 |
+ * Push STREAMS modules: |
42b6937bbc52
SFEurxvt.spec: bump to 9.11, add Patch16 initialize rows/columns, (Build)Requires SUNWgcc<|runtime> is sufficient
tom68
parents:
diff
changeset
|
47 |
+ * ptem: pseudo-terminal hardware emulation module. |
42b6937bbc52
SFEurxvt.spec: bump to 9.11, add Patch16 initialize rows/columns, (Build)Requires SUNWgcc<|runtime> is sufficient
tom68
parents:
diff
changeset
|
48 |
+ * ldterm: standard terminal line discipline. |
42b6937bbc52
SFEurxvt.spec: bump to 9.11, add Patch16 initialize rows/columns, (Build)Requires SUNWgcc<|runtime> is sufficient
tom68
parents:
diff
changeset
|
49 |
+ * ttcompat: V7, 4BSD and XENIX STREAMS compatibility module. |
42b6937bbc52
SFEurxvt.spec: bump to 9.11, add Patch16 initialize rows/columns, (Build)Requires SUNWgcc<|runtime> is sufficient
tom68
parents:
diff
changeset
|
50 |
+ * |
42b6937bbc52
SFEurxvt.spec: bump to 9.11, add Patch16 initialize rows/columns, (Build)Requires SUNWgcc<|runtime> is sufficient
tom68
parents:
diff
changeset
|
51 |
+ * After we push the STREAMS modules, the first open () on the slave side |
42b6937bbc52
SFEurxvt.spec: bump to 9.11, add Patch16 initialize rows/columns, (Build)Requires SUNWgcc<|runtime> is sufficient
tom68
parents:
diff
changeset
|
52 |
+ * (i.e. the next section between the dashes giving us "tty opened OK") |
42b6937bbc52
SFEurxvt.spec: bump to 9.11, add Patch16 initialize rows/columns, (Build)Requires SUNWgcc<|runtime> is sufficient
tom68
parents:
diff
changeset
|
53 |
+ * should make the "ptem" (or "ldterm" depending upon either which OS |
42b6937bbc52
SFEurxvt.spec: bump to 9.11, add Patch16 initialize rows/columns, (Build)Requires SUNWgcc<|runtime> is sufficient
tom68
parents:
diff
changeset
|
54 |
+ * version or which set of manual pages you have) module give us a |
42b6937bbc52
SFEurxvt.spec: bump to 9.11, add Patch16 initialize rows/columns, (Build)Requires SUNWgcc<|runtime> is sufficient
tom68
parents:
diff
changeset
|
55 |
+ * controlling terminal. We must already have close ()d the master side |
42b6937bbc52
SFEurxvt.spec: bump to 9.11, add Patch16 initialize rows/columns, (Build)Requires SUNWgcc<|runtime> is sufficient
tom68
parents:
diff
changeset
|
56 |
+ * fd in this child process before we push STREAMS modules on because the |
42b6937bbc52
SFEurxvt.spec: bump to 9.11, add Patch16 initialize rows/columns, (Build)Requires SUNWgcc<|runtime> is sufficient
tom68
parents:
diff
changeset
|
57 |
+ * documentation is really unclear about whether it is any close () on |
42b6937bbc52
SFEurxvt.spec: bump to 9.11, add Patch16 initialize rows/columns, (Build)Requires SUNWgcc<|runtime> is sufficient
tom68
parents:
diff
changeset
|
58 |
+ * the master side or the last close () - i.e. a proper STREAMS dismantling |
42b6937bbc52
SFEurxvt.spec: bump to 9.11, add Patch16 initialize rows/columns, (Build)Requires SUNWgcc<|runtime> is sufficient
tom68
parents:
diff
changeset
|
59 |
+ * close () - on the master side which causes a hang up to be sent |
42b6937bbc52
SFEurxvt.spec: bump to 9.11, add Patch16 initialize rows/columns, (Build)Requires SUNWgcc<|runtime> is sufficient
tom68
parents:
diff
changeset
|
60 |
+ * through - Geoff Wing |
42b6937bbc52
SFEurxvt.spec: bump to 9.11, add Patch16 initialize rows/columns, (Build)Requires SUNWgcc<|runtime> is sufficient
tom68
parents:
diff
changeset
|
61 |
+ */ |
42b6937bbc52
SFEurxvt.spec: bump to 9.11, add Patch16 initialize rows/columns, (Build)Requires SUNWgcc<|runtime> is sufficient
tom68
parents:
diff
changeset
|
62 |
+#if defined(HAVE_ISASTREAM) && defined(HAVE_STROPTS_H) |
42b6937bbc52
SFEurxvt.spec: bump to 9.11, add Patch16 initialize rows/columns, (Build)Requires SUNWgcc<|runtime> is sufficient
tom68
parents:
diff
changeset
|
63 |
+ if (isastream (tty) == 1) |
42b6937bbc52
SFEurxvt.spec: bump to 9.11, add Patch16 initialize rows/columns, (Build)Requires SUNWgcc<|runtime> is sufficient
tom68
parents:
diff
changeset
|
64 |
+# endif |
42b6937bbc52
SFEurxvt.spec: bump to 9.11, add Patch16 initialize rows/columns, (Build)Requires SUNWgcc<|runtime> is sufficient
tom68
parents:
diff
changeset
|
65 |
+ { |
42b6937bbc52
SFEurxvt.spec: bump to 9.11, add Patch16 initialize rows/columns, (Build)Requires SUNWgcc<|runtime> is sufficient
tom68
parents:
diff
changeset
|
66 |
+ ioctl (tty, I_PUSH, "ptem"); |
42b6937bbc52
SFEurxvt.spec: bump to 9.11, add Patch16 initialize rows/columns, (Build)Requires SUNWgcc<|runtime> is sufficient
tom68
parents:
diff
changeset
|
67 |
+ ioctl (tty, I_PUSH, "ldterm"); |
42b6937bbc52
SFEurxvt.spec: bump to 9.11, add Patch16 initialize rows/columns, (Build)Requires SUNWgcc<|runtime> is sufficient
tom68
parents:
diff
changeset
|
68 |
+ ioctl (tty, I_PUSH, "ttcompat"); |
42b6937bbc52
SFEurxvt.spec: bump to 9.11, add Patch16 initialize rows/columns, (Build)Requires SUNWgcc<|runtime> is sufficient
tom68
parents:
diff
changeset
|
69 |
+ } |
42b6937bbc52
SFEurxvt.spec: bump to 9.11, add Patch16 initialize rows/columns, (Build)Requires SUNWgcc<|runtime> is sufficient
tom68
parents:
diff
changeset
|
70 |
+#endif |
42b6937bbc52
SFEurxvt.spec: bump to 9.11, add Patch16 initialize rows/columns, (Build)Requires SUNWgcc<|runtime> is sufficient
tom68
parents:
diff
changeset
|
71 |
+ |
42b6937bbc52
SFEurxvt.spec: bump to 9.11, add Patch16 initialize rows/columns, (Build)Requires SUNWgcc<|runtime> is sufficient
tom68
parents:
diff
changeset
|
72 |
return true; |
42b6937bbc52
SFEurxvt.spec: bump to 9.11, add Patch16 initialize rows/columns, (Build)Requires SUNWgcc<|runtime> is sufficient
tom68
parents:
diff
changeset
|
73 |
} |
42b6937bbc52
SFEurxvt.spec: bump to 9.11, add Patch16 initialize rows/columns, (Build)Requires SUNWgcc<|runtime> is sufficient
tom68
parents:
diff
changeset
|
74 |