[prev in list] [next in list] [prev in thread] [next in thread] 

List:       konsole-devel
Subject:    [Konsole-devel] Bug#42986: Problem with konsole_grantpty
From:       michael () miknet ! net (Michael Samuel)
Date:       2002-08-29 23:45:44
[Download RAW message or body]

I've spent a while tracking down the FreeBSD problem with chownpty, and
it seems that the problem is with the dup2() failing before spawning
konsole_grantpty. (When dup2() fails, you're just silently exiting,
rather than printing and error)

I can't see any reason why this would fail (it's failing and setting
errno to EBADF), and I even added some printf()s to my kernel code, and
the _only_ place where EBADF can be reported by the dup2 system call
isn't being hit.

The file descriptor is definately valid, as I added a fcntl(fd, F_GETFD)
right before the dup2(), and the fcntl succeeds.

I wrote a testcase program to try and duplicate the error, and was
unable to reproduce the problem.

I'm also not convinced that there isn't a race condition even when
chownpty does succeed (at-least with the Linux/*BSD method of obtaining
the pty devices), in the time between when the master device is openned,
and the time when the ownership/permissions are set.


(Complete bug history is available at http://bugs.kde.org/db/42/42986.html)
_______________________________________________
konsole-devel mailing list
konsole-devel@mail.kde.org
http://mail.kde.org/mailman/listinfo/konsole-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic