xxgdb: all ptys in use
Alf-Ivar Holm
alfh at student.matnat.uio.no
Thu Apr 7 17:42:16 UTC 2005
Robert Crosbie <swingincelt at gmail.com> writes:
> When running xxgdb as a normal user, I get the following message:
> $ xxgdb
> xxgdb: all ptys in use
>
> I can run it as root or sudo though.
>
> I'm running Hoary, but not latest. Is there a setting I can change to fix this?
"strace xxgdb" (on a Hoary updated today) gives a lot of lines like
this (where pty<xx> is the changing part):
open("/dev/ptyp0", O_RDWR) = -1 EACCES (Permission denied)
and the file permissions for these are like this:
crw-rw---- 1 root root 2, 0 2005-03-17 20:14 /dev/ptyp0
According to this page (in German):
http://schueler.eckert-schulen.de/sdb/de/html/ke_devpts-63.html
there is a security reason for that. The remedy given there did not
work for me (by changing the group to tty and add a +s flag to the
ptys), but if you are the sole user of your box you can run "sudo
chgrp users /dev/pty*" and xxgdb will run. Note: I don't know what
kind of side effects and security risks this will introduce.
According to pts(4) ("man pts", that is) the /dev/pty* naming scheme
is some kind of pre-Unix98 naming. Warty seems to use the Unix98 way
only, where they are allocated when needed and called /dev/pts/<n>,
where <n> is the number in use. Not that xxgdb works in Warty, as it
tried to find /dev/pty* there too:
open("/dev/ptyp0", O_RDWR) = -1 ENOENT (No such file or directory)
The lasting fix would be to rewrite xxgdb to use Unix98 ptys I guess
...
Alternatives to xxgdb are ddd and kdbg, both in universe.
Affi
More information about the ubuntu-users
mailing list