Libguile printer for ports on ttys.

View: New views
2 Messages — Rating Filter:   Alert me  

Libguile printer for ports on ttys.

by Daniel Ridge :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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





Re: Libguile printer for ports on ttys.

by Neil Jerram :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

dskr <dskr@...> 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