Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <40550695.381F42A@dessent.net> Date: Sun, 14 Mar 2004 17:27:49 -0800 From: Brian Dessent Organization: My own little world... MIME-Version: 1.0 To: cygwin Subject: Re: XITE under CYGWIN gives pty errors References: <003c01c409d8$d20ed5b0$6501a8c0 AT AMD2000> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Reply-To: cygwin AT cygwin DOT com Rob van Aarle wrote: > with these relevant comments: > 'XptyStartProgram' allocates a pty (pseudo terminal) (either > by calling system function '_getpty' (if source is compiled > with GETPTY defined)) or by trying to open devices /dev/ptyxy > (master) and /dev/ttyxy (slave) (where "x" is one of the > characters "pqrstuvwxyz", "y" is one of the characters > "0123456789abcdef"). This is the old traditional BSD way of allocating ptys. However, I believe that Cygwin only supports the newer Unix98 method. Instead of searching for a free device, you just open /dev/ptmx and you are assigned a file descriptor for the master. Then you call ptsname() to get the pathname of the slave, and then open it. I'm sure if you do a little googling (or searching through Cygwin sources for e.g. rxvt or xterm) you can find some code snippets of how this is done. Brian -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/