So, could you use this patch instead please?
Samuel
#! /bin/sh /usr/share/dpatch/dpatch-run
## 12kfreebsd_ctty.dpatch by <[email protected]>
##
## DP: See inline documentation.
@DPATCH@
--- screen-4.0.3.orig/tty.sh 2009-04-10 18:15:51.923805915 +0200
+++ screen-4.0.3/tty.sh 2009-04-10 18:17:56.043804602 +0200
@@ -801,18 +801,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