From 2642def0f2deb121a41ae9e20de38a67cfc0af16 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Thu, 10 Jan 2013 03:11:35 -0800 Subject: SpawnProcess: handle fcntl ENOTTY for FreeBSD --- pym/_emerge/SpawnProcess.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/pym/_emerge/SpawnProcess.py b/pym/_emerge/SpawnProcess.py index f226dcb8f..5d0fcf6dd 100644 --- a/pym/_emerge/SpawnProcess.py +++ b/pym/_emerge/SpawnProcess.py @@ -117,9 +117,14 @@ class SpawnProcess(SubProcess): except AttributeError: pass else: - fcntl.fcntl(stdout_fd, fcntl.F_SETFL, - fcntl.fcntl(stdout_fd, - fcntl.F_GETFL) | fcntl.FD_CLOEXEC) + try: + fcntl.fcntl(stdout_fd, fcntl.F_SETFL, + fcntl.fcntl(stdout_fd, + fcntl.F_GETFL) | fcntl.FD_CLOEXEC) + except IOError: + # FreeBSD may return "Inappropriate ioctl for device" + # error here (ENOTTY). + pass self._pipe_logger = PipeLogger(background=self.background, scheduler=self.scheduler, input_fd=master_fd, -- cgit v1.2.3-1-g7c22