From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2836 invoked from network); 1 Sep 2003 09:22:10 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 1 Sep 2003 09:22:10 -0000 Received: (qmail 19450 invoked by alias); 1 Sep 2003 09:22:03 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 18991 Received: (qmail 19438 invoked from network); 1 Sep 2003 09:22:03 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 1 Sep 2003 09:22:03 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [192.35.17.2] by sunsite.dk (MessageWall 1.0.8) with SMTP; 1 Sep 2003 9:22:2 -0000 Received: from mail3.siemens.de (mail3.siemens.de [139.25.208.14]) by thoth.sbs.de (8.11.7/8.11.7) with ESMTP id h819M1Z21096; Mon, 1 Sep 2003 11:22:01 +0200 (MEST) Received: from MOWD019A.mow.siemens.ru ([163.242.196.119]) by mail3.siemens.de (8.11.7/8.11.7) with ESMTP id h819M0G14806; Mon, 1 Sep 2003 11:22:01 +0200 (MEST) Received: by mowd019a.mow.siemens.ru with Internet Mail Service (5.5.2653.19) id ; Mon, 1 Sep 2003 13:29:48 +0400 Received: from mw2b210c (163.242.193.12 [163.242.193.12]) by MOWD019A.mow.siemens.ru with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2653.13) id R528KCTT; Mon, 1 Sep 2003 13:29:39 +0400 From: Borzenkov Andrey To: "'Alexey Tourbin'" Cc: zsh-workers@sunsite.dk Subject: RE: zpty Date: Mon, 1 Sep 2003 13:21:46 +0400 Message-ID: <6134254DE87BD411908B00A0C99B044F05A0C9D3@mowd019a.mow.siemens.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.4510 Importance: Normal In-Reply-To: <20030829110333.GB2661@julia.office.altlinux.ru> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 >=20 > I'm new to this mailing list. I've been using zsh for a while. > Recently I found out that zpty actually does not work on my Linux > system. >=20 > $ zmodload zsh/zpty > $ zpty date date > zpty: can't open pseudo terminal: bad file descriptor > $ >=20 > As I digged into the code, I saw those old-style /dev/ptyxx = heuristics > which may not work on some modern Linux systems because the location = is > changed to /dev/pts/xx. Meanwhile there's an API in glibc for = dealing > with pseudo terminals. So I reworked that code a bit. >=20 the location has not changed. /dev/pts are for SVR4 ptys; it depends on = your system if they are compiled in kernel (as well as old-style ones). > Now it works fine for me. Of course it's not portable, it works with > glibc only. But glibc is one of the most popular libc = implementation, > and it works not on Linux systems only. So please consider whether = this > can be useful somehow. >=20 This won't without suitable configure tests. You can't assume glibc is = the only existing libc implementation. Your patch simply kills zpty on my system. If you change your patch to probe for SVR4-style ptys on Linux = in addition to traditional ones without touching other systems, I's say it = may be included. The same applies to headers, you can't include headers without testing = for their existence. error.h does not exist here. BTW convention is that all includes and in .h not in C files, = but it may be not as strict. -andrey