From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 23 22:08:48 2012 Received: (at submit) by debbugs.gnu.org; 24 Jul 2012 02:08:48 +0000 Received: from localhost ([127.0.0.1]:34300 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1StUYJ-0006na-PE for submit@debbugs.gnu.org; Mon, 23 Jul 2012 22:08:48 -0400 Received: from eggs.gnu.org ([208.118.235.92]:51371) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1StUYH-0006nN-Nl for submit@debbugs.gnu.org; Mon, 23 Jul 2012 22:08:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1StURr-0007LS-Hi for submit@debbugs.gnu.org; Mon, 23 Jul 2012 22:02:08 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.5 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, RCVD_IN_XBL,T_DKIM_INVALID autolearn=ham version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:45051) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1StURr-0007LO-Et for submit@debbugs.gnu.org; Mon, 23 Jul 2012 22:02:07 -0400 Received: from eggs.gnu.org ([208.118.235.92]:49429) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1StURq-0007MJ-4u for bug-gnu-emacs@gnu.org; Mon, 23 Jul 2012 22:02:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1StURo-0007KM-Bh for bug-gnu-emacs@gnu.org; Mon, 23 Jul 2012 22:02:06 -0400 Received: from server2.allsitecontrol.com ([63.143.36.210]:53207) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1StURo-0007Ho-2h for bug-gnu-emacs@gnu.org; Mon, 23 Jul 2012 22:02:04 -0400 Received: from wau.torservers.net ([109.163.233.200]:55115 helo=internal.tormail.org) by server2.allsitecontrol.com with esmtpsa (TLSv1:RC4-SHA:128) (Exim 4.77) (envelope-from ) id 1StURa-002vIh-N3 for bug-gnu-emacs@gnu.org; Mon, 23 Jul 2012 22:01:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tormail.org; s=tm; h=Message-Id:X-TorMail-User:Content-Type:MIME-Version:Date:Subject:To:From; bh=tsGX+x1fTPOlfqB+JXkk4YjBjm8JgPZ7wHOSLgHBdKY=; b=i5BxH/SXVXw2HgDtA1giefxo80zC7La1mFy1K1+5DYdaKRR73L1Ey947j/MBCaLUQhfeChKu3HERT8eCBy/+XPinpsGhHkIt3pKCwiyCQWDUGtAJ32IRXuIe/wg7dMXlvUgKgrgbUBKr4iNOP0oKz+QmxInW8QgXKhpXSrkRC9k=; Received: from jbeich by internal.tormail.org with local (Exim 4.63) (envelope-from ) id 1StGrf-000La0-Jk for bug-gnu-emacs@gnu.org; Mon, 23 Jul 2012 11:31:53 +0000 From: Jan Beich To: bug-gnu-emacs@gnu.org Subject: 24.1.50; `term' hangs on FreeBSD 10.0-CURRENT without pty(4) Date: Mon, 23 Jul 2012 23:31:27 +1200 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-TorMail-User: jbeich Message-Id: <1StGrf-000La0-Jk@internal.tormail.org> X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - server2.allsitecontrol.com X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tormail.org X-Source: X-Source-Args: X-Source-Dir: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.118.235.17 X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) --=-=-= Content-Type: text/plain Starting with FreeBSD 8.0-RELEASE the system uses new tty layer that no longer supports old style pseudo ttys *unless* pty(4) kernel module is loaded. However, pty(4) device is still included in GENERIC kernel on all releases except 10.0-CURRENT (removed in r233271). $ emacs -Q M-x term $ sudo kldload pty [try again] A few ways to solve this: - use openpty() in -lutil like darwin - add use posix_openpt() support http://svn.freebsd.org/changeset/base/233271 https://pub.allbsd.org/FreeBSD-snapshots/ # for testing, seems to be down atm --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=openpty.diff === modified file 'configure.ac' --- configure.ac 2012-07-17 07:30:25 +0000 +++ configure.ac 2012-07-21 09:10:00 +0000 @@ -1220,7 +1220,7 @@ linux/version.h sys/systeminfo.h stdio_ext.h fcntl.h coff.h pty.h sys/vlimit.h sys/resource.h - sys/utsname.h pwd.h utmp.h dirent.h util.h) + sys/utsname.h pwd.h utmp.h dirent.h util.h libutil.h) AC_MSG_CHECKING(if personality LINUX32 can be set) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[personality (PER_LINUX32)]])], @@ -3344,7 +3344,7 @@ AC_DEFINE(PTY_TTY_NAME_SPRINTF, [] ) ;; - darwin ) + darwin | freebsd ) AC_DEFINE(PTY_ITERATION, [int i; for (i = 0; i < 1; i++)] ) dnl Not used, because PTY_ITERATION is defined. AC_DEFINE(FIRST_PTY_LETTER, ['p']) @@ -3356,7 +3356,7 @@ AC_DEFINE(PTY_TTY_NAME_SPRINTF, [] ) ;; - gnu | freebsd | netbsd | openbsd ) + gnu | netbsd | openbsd ) AC_DEFINE(FIRST_PTY_LETTER, ['p']) ;; === modified file 'src/process.c' --- src/process.c 2012-07-20 07:29:04 +0000 +++ src/process.c 2012-07-21 09:10:00 +0000 @@ -83,6 +83,10 @@ #include #endif +#ifdef HAVE_LIBUTIL_H +#include +#endif + #ifdef HAVE_PTY_H #include #endif --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=posix_openpt.diff === modified file 'configure.ac' --- configure.ac 2012-07-17 07:30:25 +0000 +++ configure.ac 2012-07-23 10:52:48 +0000 @@ -2759,7 +2759,7 @@ AC_CHECK_FUNCS(grantpt) # PTY-related GNU extensions. -AC_CHECK_FUNCS(getpt) +AC_CHECK_FUNCS(getpt posix_openpt) # Check this now, so that we will NOT find the above functions in ncurses. # That is because we have not set up to link ncurses in lib-src. @@ -3356,11 +3356,11 @@ AC_DEFINE(PTY_TTY_NAME_SPRINTF, [] ) ;; - gnu | freebsd | netbsd | openbsd ) + gnu | netbsd | openbsd ) AC_DEFINE(FIRST_PTY_LETTER, ['p']) ;; - gnu-linux | gnu-kfreebsd ) + gnu-linux | gnu-kfreebsd | freebsd ) dnl if HAVE_GRANTPT if test "x$ac_cv_func_grantpt" = xyes; then AC_DEFINE(UNIX98_PTYS, 1, [Define if the system has Unix98 PTYs.]) @@ -3368,8 +3368,12 @@ dnl Note that grantpt and unlockpt may fork. We must block SIGCHLD dnl to prevent sigchld_handler from intercepting the child's death. AC_DEFINE(PTY_TTY_NAME_SPRINTF, [{ char *ptyname; sigblock (sigmask (SIGCHLD)); if (grantpt (fd) == -1 || unlockpt (fd) == -1 || !(ptyname = ptsname(fd))) { sigunblock (sigmask (SIGCHLD)); close (fd); return -1; } snprintf (pty_name, sizeof pty_name, "%s", ptyname); sigunblock (sigmask (SIGCHLD)); }] ) + dnl if HAVE_POSIX_OPENPT + if test "x$ac_cv_func_posix_openpt" = xyes; then + AC_DEFINE(PTY_OPEN, [fd = posix_openpt (O_RDWR | O_NOCTTY)]) + AC_DEFINE(PTY_NAME_SPRINTF, [] ) dnl if HAVE_GETPT - if test "x$ac_cv_func_getpt" = xyes; then + elif test "x$ac_cv_func_getpt" = xyes; then AC_DEFINE(PTY_OPEN, [fd = getpt ()]) AC_DEFINE(PTY_NAME_SPRINTF, [] ) else --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 15 13:13:36 2012 Received: (at control) by debbugs.gnu.org; 15 Aug 2012 17:13:36 +0000 Received: from localhost ([127.0.0.1]:59412 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T1hA0-0008DI-4f for submit@debbugs.gnu.org; Wed, 15 Aug 2012 13:13:36 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:46591) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T1h9y-0008DB-4N for control@debbugs.gnu.org; Wed, 15 Aug 2012 13:13:34 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1T1h1V-0004Ho-6R for control@debbugs.gnu.org; Wed, 15 Aug 2012 13:04:49 -0400 Date: Wed, 15 Aug 2012 13:04:49 -0400 Message-Id: Subject: control message for bug 12040 To: X-Mailer: mail (GNU Mailutils 2.1) From: Glenn Morris X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) severity 12040 important tag 12040 patch From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 16 02:54:25 2012 Received: (at 12040) by debbugs.gnu.org; 16 Aug 2012 06:54:25 +0000 Received: from localhost ([127.0.0.1]:60293 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T1tyI-0003B4-Px for submit@debbugs.gnu.org; Thu, 16 Aug 2012 02:54:24 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:33696) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T1tyF-0003At-DC for 12040@debbugs.gnu.org; Thu, 16 Aug 2012 02:54:20 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1T1tpi-0005b4-QA; Thu, 16 Aug 2012 02:45:30 -0400 From: Glenn Morris To: Jan Beich Subject: Re: bug#12040: 24.1.50; `term' hangs on FreeBSD 10.0-CURRENT without pty(4) References: <1StGrf-000La0-Jk@internal.tormail.org> X-Spook: militia munitions anthrax Qaddafi Vickie Weaver rail gun X-Ran: q@w){U8EeTsy44Imj>AFoq2arQXF(vXkr'QQIJZRB5Og5)E2~LdqAgII>f:E/=Cjeq5X#Q X-Hue: cyan X-Debbugs-No-Ack: yes X-Attribution: GM Date: Thu, 16 Aug 2012 02:45:30 -0400 In-Reply-To: <1StGrf-000La0-Jk@internal.tormail.org> (Jan Beich's message of "Mon, 23 Jul 2012 23:31:27 +1200") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: 12040 Cc: 12040@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) Jan Beich wrote: > A few ways to solve this: > - use openpty() in -lutil like darwin > - add use posix_openpt() support Thanks for the patches. Do you (or anyone else) have a feeling for which is the best? As written the posix_openpt one changes the behaviour on gnu-linux platforms to use posix_openpt instead of getpt. From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 16 06:21:07 2012 Received: (at 12040) by debbugs.gnu.org; 16 Aug 2012 10:21:07 +0000 Received: from localhost ([127.0.0.1]:60636 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T1xCM-00017d-Iq for submit@debbugs.gnu.org; Thu, 16 Aug 2012 06:21:06 -0400 Received: from [66.55.76.125] (port=54256 helo=cpanel.centralhosts.net) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T1xCK-00017W-Mo for 12040@debbugs.gnu.org; Thu, 16 Aug 2012 06:21:05 -0400 Received: from manning1.torservers.net ([96.44.189.100]:61689 helo=internal.tormail.org) by cpanel.centralhosts.net with esmtpsa (TLSv1:RC4-SHA:128) (Exim 4.77) (envelope-from ) id 1T1x2l-0001KR-QK; Thu, 16 Aug 2012 06:11:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tormail.org; s=tm; h=Message-Id:X-TorMail-User:Content-Type:MIME-Version:References:Date:Subject:Cc:To:From; bh=Iiwlfyv/nFcMZnAaCUKoIqdIev4fN7+LmDZTxe+esM8=; b=NKVpz29B0kDCicfSebKPOio9VTTNs9bEoNtDZ14zIJZQQenh19WaPXeNkoGxQI6dpeVYJg9xRDnArVEpyquhx5B43iiDEw+2hm5Pz2OCgQ7TUX56KQL+v6D+EbbCXHG/tnWJXaxxZWKPjJkJ46O9zOJtEjcaB1vg16ZduBMmQok=; Received: from jbeich by internal.tormail.org with local (Exim 4.63) (envelope-from ) id 1T1x1j-0005QU-RK; Thu, 16 Aug 2012 10:10:09 +0000 From: Jan Beich To: Glenn Morris Subject: Re: bug#12040: 24.1.50; `term' hangs on FreeBSD 10.0-CURRENT without pty(4) Date: Thu, 16 Aug 2012 05:10:03 -0500 References: <1StGrf-000La0-Jk@internal.tormail.org> <1T1tp3-000F13-AB@internal.tormail.org> MIME-Version: 1.0 Content-Type: text/plain X-TorMail-User: jbeich Message-Id: <1T1x1j-0005QU-RK@internal.tormail.org> X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - cpanel.centralhosts.net X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tormail.org X-Spam-Score: -1.1 (-) X-Debbugs-Envelope-To: 12040 Cc: 12040@debbugs.gnu.org, Robert Millan X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.1 (-) (cc'ing Robert in case I misread glibc code) Glenn Morris writes: > Jan Beich wrote: > >> A few ways to solve this: >> - use openpty() in -lutil like darwin >> - add use posix_openpt() support > > Thanks for the patches. > Do you (or anyone else) have a feeling for which is the best? I'd go with less wrappers - posix_openpt(). And also use it on netbsd, dragonfly and probably darwin. openpty() is implemented via posix_openpt() in libutil on recent freebsd. posix_openpt() is a syscall on (k)freebsd. And /dev/ptmx only exists if pty(4) is loaded, not sure how it affects binaries under linuxulator. > As written the posix_openpt one changes the behaviour on gnu-linux > platforms to use posix_openpt instead of getpt. In glibc/linux case getpt() is implemented via posix_openpt(): // sysdeps/unix/sysv/linux/getpt.c int __getpt (void) { int fd = __posix_openpt (O_RDWR); if (fd == -1) fd = __bsd_getpt (); return fd; } In glibc/kfreebsd case getpt() iterates over /dev/ptyXX which won't work without pty(4) in kernel. From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 17 03:30:46 2012 Received: (at 12040-done) by debbugs.gnu.org; 17 Aug 2012 07:30:46 +0000 Received: from localhost ([127.0.0.1]:34641 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T2H14-0008FI-HL for submit@debbugs.gnu.org; Fri, 17 Aug 2012 03:30:46 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:56575) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T2H11-0008FA-KE for 12040-done@debbugs.gnu.org; Fri, 17 Aug 2012 03:30:44 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1T2GsP-0008EP-CS; Fri, 17 Aug 2012 03:21:49 -0400 From: Glenn Morris To: 12040-done@debbugs.gnu.org Subject: Re: bug#12040: 24.1.50; `term' hangs on FreeBSD 10.0-CURRENT without pty(4) References: <1StGrf-000La0-Jk@internal.tormail.org> <1T1tp3-000F13-AB@internal.tormail.org> <1T1x1j-0005QU-RK@internal.tormail.org> X-Spook: SEAL Team 6 Serbian AGT. AMME Clinton CDMA basement X-Ran: 0|'1n8AM"H8fQCXq`<33Gr\#i7MU}Fv?(A(=}8Q:d=N1i$o;|31T`j'MU|[Qd)vM!y0@;" X-Hue: magenta X-Debbugs-No-Ack: yes X-Attribution: GM Date: Fri, 17 Aug 2012 03:21:49 -0400 In-Reply-To: <1T1x1j-0005QU-RK@internal.tormail.org> (Jan Beich's message of "Thu, 16 Aug 2012 05:10:03 -0500") Message-ID: <1f393myodu.fsf@fencepost.gnu.org> User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: 12040-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) Version: 24.3 Thanks, I'm convinced. I installed the posix_openpt change for freebsd and netbsd to the trunk, currently expected to be released as 24.3. I left darwin alone for the time being. From unknown Mon Aug 18 11:25:15 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 14 Sep 2012 11:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator