From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jan Beich Newsgroups: gmane.emacs.bugs Subject: bug#12040: 24.1.50; `term' hangs on FreeBSD 10.0-CURRENT without pty(4) Date: Thu, 16 Aug 2012 05:10:03 -0500 Message-ID: <1T1x1j-0005QU-RK@internal.tormail.org> References: <1StGrf-000La0-Jk@internal.tormail.org> <1T1tp3-000F13-AB@internal.tormail.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1345112003 27511 80.91.229.3 (16 Aug 2012 10:13:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 16 Aug 2012 10:13:23 +0000 (UTC) Cc: 12040@debbugs.gnu.org, Robert Millan To: Glenn Morris Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Aug 16 12:13:21 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1T1x4p-0000Zx-Ux for geb-bug-gnu-emacs@m.gmane.org; Thu, 16 Aug 2012 12:13:20 +0200 Original-Received: from localhost ([::1]:45022 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T1x4o-0002y5-JV for geb-bug-gnu-emacs@m.gmane.org; Thu, 16 Aug 2012 06:13:18 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:49333) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T1x4l-0002xd-Ap for bug-gnu-emacs@gnu.org; Thu, 16 Aug 2012 06:13:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T1x4k-0005Lk-7K for bug-gnu-emacs@gnu.org; Thu, 16 Aug 2012 06:13:15 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:51091) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T1x4j-0005Lc-MO for bug-gnu-emacs@gnu.org; Thu, 16 Aug 2012 06:13:14 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1T1xDF-00018n-Ry for bug-gnu-emacs@gnu.org; Thu, 16 Aug 2012 06:22:01 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: <1StGrf-000La0-Jk@internal.tormail.org> Resent-From: Jan Beich Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 16 Aug 2012 10:22:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12040 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 12040-submit@debbugs.gnu.org id=B12040.13451124674320 (code B ref 12040); Thu, 16 Aug 2012 10:22:01 +0000 Original-Received: (at 12040) by debbugs.gnu.org; 16 Aug 2012 10:21:07 +0000 Original-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 Original-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 Original-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=; Original-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 X-TorMail-User: jbeich 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:63227 (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.