OSError: [Errno 9] Bad file descriptor
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ubiquity (Ubuntu) |
Fix Released
|
High
|
Colin Watson |
Bug Description
After working around https:/
Code that had previously worked under python 2.x (used in 12.04 LTS, AFAICT) is now too aggressive under python 3.x (used in 14.04 LTS). This is resulting the the file descriptor for /dev/urandom being closed prematurely in open_terminal(), due to the following section:
for i in range(tty):
if i != 2:
However, as reported here: http://
Sure enough, if I prevent oem-config from closing the fd for /dev/urandom, oem-config is finally able to at least run.
The following is how I've solved the problem so far.
# need to avoid closing the FD for /dev/urandom
# http://
urand_inode = os.stat(
for i in range(tty):
if i != 2:
if inode != urand_inode:
Related branches
affects: | oem-config (Ubuntu) → ubiquity (Ubuntu) |
Changed in ubiquity (Ubuntu): | |
status: | New → Fix Committed |
assignee: | nobody → Colin Watson (cjwatson) |
importance: | Undecided → High |
This bug was fixed in the package ubiquity - 2.19.8
---------------
ubiquity (2.19.8) utopic; urgency=medium
[ Colin Watson ]
* Avoid closing /dev/urandom persistent FD on oem-config startup (thanks,
Jamin W. Collins; LP: #1362920).
[ Chris Bainbridge ]
* Fix Windows UEFI detection. (LP: #1265192)
-- Stephane Graber <email address hidden> Fri, 12 Sep 2014 14:35:57 -0400