summaryrefslogtreecommitdiff
path: root/debian/patches/12kfreebsd_ctty.patch
blob: ef28cecc3e7d81aab1135297663937b54501c75c (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
26
27
28
Author: <hesso@pool.math.tu-berlin.de>
Description: See inline documentation.
Index: screen/tty.sh
===================================================================
--- screen.orig/tty.sh	2011-10-08 19:54:22.000000000 +0200
+++ screen/tty.sh	2011-10-08 19:58:28.000000000 +0200
@@ -808,18 +808,11 @@
 
   mypid = getpid();
 
-  /* The next lines should be obsolete. Can anybody check if they
-   * are really needed on the BSD platforms?
-   *
-   * this is to avoid the message:
-   *	fgtty: Not a typewriter (25)
+  /*
+   * Under BSD we have to set the controlling terminal again explicitly.
    */
-# if defined(__osf__) || (BSD >= 199103) || defined(ISC)
-  if (separate_sids)
-    setsid();	/* should be already done */
-#  ifdef TIOCSCTTY
+# if (defined(__FreeBSD_kernel__) || defined(__GNU__)) && defined(TIOCSCTTY)
   ioctl(fd, TIOCSCTTY, (char *)0);
-#  endif
 # endif
 
 # ifdef POSIX