SpawnProcess: Don't handle FreeBSD fcntl ENOTTY
authorZac Medico <zmedico@gentoo.org>
Mon, 2 Sep 2013 19:48:49 +0000 (12:48 -0700)
committerZac Medico <zmedico@gentoo.org>
Mon, 2 Sep 2013 19:48:49 +0000 (12:48 -0700)
This error does not occur since the fcntl call was fixed to properly
use the F_GETFD/F_SETFD commands in commit
30c652a9db1014fc720f7d6055520a07b731c984.

pym/_emerge/SpawnProcess.py

index c7872cab07a70f71d66161417436fc80292a2734..021e54616b4872bb8312108801d9556c161a88d2 100644 (file)
@@ -132,16 +132,9 @@ class SpawnProcess(SubProcess):
                                except AttributeError:
                                        pass
                                else:
-                                       try:
-                                               fcntl.fcntl(stdout_fd, fcntl.F_SETFD,
-                                                       fcntl.fcntl(stdout_fd,
-                                                       fcntl.F_GETFD) | fcntl.FD_CLOEXEC)
-                                       except IOError:
-                                               # FreeBSD may return "Inappropriate ioctl for device"
-                                               # error here (ENOTTY). TODO: Test this again now that
-                                               # it's been fixed to use F_GETFD/F_SETFD instead of
-                                               # F_GETFL/F_SETFL.
-                                               pass
+                                       fcntl.fcntl(stdout_fd, fcntl.F_SETFD,
+                                               fcntl.fcntl(stdout_fd,
+                                               fcntl.F_GETFD) | fcntl.FD_CLOEXEC)
 
                self._pipe_logger = PipeLogger(background=self.background,
                        scheduler=self.scheduler, input_fd=master_fd,