ports/161181: [patch] editors/emacs-devel: don't depend on pty(4), use openpty(3)

Nali Toja nalitoja at gmail.com
Sat Oct 1 07:10:07 UTC 2011


>Number:         161181
>Category:       ports
>Synopsis:       [patch] editors/emacs-devel: don't depend on pty(4), use openpty(3)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Oct 01 07:10:06 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     h h
>Release:        FreeBSD 10.0-CURRENT amd64
>Organization:
>Environment:
>Description:
>How-To-Repeat:
1. compile kernel without pty(4)
2. try to use tramp, it'd hang

And if you load pty.ko the kernel would print

  pid 1234 (emacs) is using legacy pty devices - not logging anymore
>Fix:
copied from src/s/darwin.h

--- use_openpty.diff begins here ---
=== modified file 'src/s/freebsd.h'
--- src/s/freebsd.h	2011-02-16 01:35:20 +0000
+++ src/s/freebsd.h	2011-10-01 06:44:33 +0000
@@ -61,3 +61,17 @@
 
 /* Use the GC_MAKE_GCPROS_NOOPS (see lisp.h) method for marking the stack.  */
 #define GC_MARK_STACK 	GC_MAKE_GCPROS_NOOPS
+
+#define PTY_ITERATION	int i; for (i = 0; i < 1; i++)
+#define PTY_NAME_SPRINTF	/* none */
+#define PTY_TTY_NAME_SPRINTF	/* none */
+#define PTY_OPEN						\
+  do								\
+    {								\
+      int slave;						\
+      if (openpty (&fd, &slave, pty_name, NULL, NULL) == -1)	\
+	fd = -1;						\
+      else							\
+	emacs_close (slave);					\
+    }								\
+  while (0)
--- use_openpty.diff ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list