NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

NetBSD 6 upgrade removes pty files, causing issues with inferior processes in emacs

Hello all,

After upgrading my machines to NetBSD 6, which mostly worked, I ran
into some trouble.  One of the issues was that after rebuilding
emacs (which was neccessary due to libpthread conflicts) it no longer
functioned correctly with inferior processes.

For example, running psql from eshell or sql-mode caused it to not
display anything until \q was typed.  The same happened with Ruby's
irb, Chicken Scheme's csi and Gauche's gosh programs.  For some reason,
Guile's interactive process worked fine.

Initially I thought it was a bug in emacs (since my upgrade also
included a switch to emacs 24), but others verified that it worked
for them, which pointed to a problem with NetBSD or the emacs package
in pkgsrc.

It turned out that the isatty() check done by these programs fails
when run from inside emacs.  For some reason the postinstall(8) checks
include a "ptyfsoldnodes" check, which when "fixed" removes all
/dev/[tp]typ* files.  Emacs tries to grab one of these when you run
an eshell or an inferior process (comint-mode), and fails.

So my question is why was this removed, and what's the "correct" way
to get programs like Emacs working properly again?  For now I just
ran "/dev/MAKEDEV opty" to restore these files.  A fresh NetBSD
installation probably also doesn't have these files.

"The process of preparing programs for a digital computer
 is especially attractive, not only because it can be economically
 and scientifically rewarding, but also because it can be an aesthetic
 experience much like composing poetry or music."
                                                        -- Donald Knuth

Home | Main Index | Thread Index | Old Index