From: Zac Medico Date: Thu, 10 Jan 2013 11:11:35 +0000 (-0800) Subject: SpawnProcess: handle fcntl ENOTTY for FreeBSD X-Git-Tag: v2.2.0_alpha150~3 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=2642def0f2deb121a41ae9e20de38a67cfc0af16;p=portage.git SpawnProcess: handle fcntl ENOTTY for FreeBSD --- 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,