unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* Libguile printer for ports on ttys.
@ 2009-11-11 21:07 dskr
  2009-11-14 14:09 ` Neil Jerram
  2010-08-28 20:34 ` Andy Wingo
  0 siblings, 2 replies; 3+ messages in thread
From: dskr @ 2009-11-11 21:07 UTC (permalink / raw)
  To: guile-user@gnu.org

The default libguile printer for port objects attempts to print TTY  
names for fds for which are ttys. This printer fails when ttyname  
returns null. This is the case, at least, on Mac OS X for master ptys.

Although Guile cannot typically make a master pty, it can inherit one.  
I am trying to finish an extension library that provides full pty  
support but could use a fix here.

Cheers,
Dan Ridge






^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Libguile printer for ports on ttys.
  2009-11-11 21:07 Libguile printer for ports on ttys dskr
@ 2009-11-14 14:09 ` Neil Jerram
  2010-08-28 20:34 ` Andy Wingo
  1 sibling, 0 replies; 3+ messages in thread
From: Neil Jerram @ 2009-11-14 14:09 UTC (permalink / raw)
  To: dskr; +Cc: guile-user@gnu.org

dskr <dskr@mac.com> writes:

> The default libguile printer for port objects attempts to print TTY
> names for fds for which are ttys. This printer fails when ttyname
> returns null. This is the case, at least, on Mac OS X for master ptys.

So isatty() returns TRUE, but ttyname() returns NULL (for the same
port).  Does that make sense, or is it arguably a Mac OS C library bug?

(This is an open question.  I don't really know what ptys are.)

> Although Guile cannot typically make a master pty, it can inherit
> one. I am trying to finish an extension library that provides full pty
> support but could use a fix here.

Assuming the above isn't a C library bug, can you suggest what Guile
should print for a pty?

Thanks,
        Neil




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Libguile printer for ports on ttys.
  2009-11-11 21:07 Libguile printer for ports on ttys dskr
  2009-11-14 14:09 ` Neil Jerram
@ 2010-08-28 20:34 ` Andy Wingo
  1 sibling, 0 replies; 3+ messages in thread
From: Andy Wingo @ 2010-08-28 20:34 UTC (permalink / raw)
  To: dskr; +Cc: guile-user@gnu.org

Hi Dan,

A little late, but still...

On Wed 11 Nov 2009 13:07, dskr <dskr@mac.com> writes:

> The default libguile printer for port objects attempts to print TTY
> names for fds for which are ttys. This printer fails when ttyname
> returns null. This is the case, at least, on Mac OS X for master ptys.
>
> Although Guile cannot typically make a master pty, it can inherit one. I
> am trying to finish an extension library that provides full pty  support
> but could use a fix here.

Why does ttyname() return NULL for an fd which isatty()? Is this a bug
in Mac OS X? How does one discriminate between a failed call to
ttyname() (e.g., on an fd that is not a tty), and a call to ttyname() on
a valid but nameless tty?

Thanks,

Andy
-- 
http://wingolog.org/



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-08-28 20:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-11 21:07 Libguile printer for ports on ttys dskr
2009-11-14 14:09 ` Neil Jerram
2010-08-28 20:34 ` Andy Wingo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).