Python 在Linux和OS X上设置fcntl F_

Python 在Linux和OS X上设置fcntl F_,python,linux,macos,fcntl,Python,Linux,Macos,Fcntl,在Linux(Ubuntu14.04)上,使用默认的python(2.7.6),以下操作可以正确地将stdin的所有者设置为当前进程,以便接收SIGIO中断: import os, sys, fcntl fcntl.fcntl(sys.stdin, fcntl.F_SETOWN, os.getpid()) 但是,在OS X(10.9.2)上,默认python(2.7.5)中的同一行返回: 无论是用于fcntl的OSX手册页还是与Linux等效的手册页,还是python文档都没有提供任何帮助 发

在Linux(Ubuntu14.04)上,使用默认的python(2.7.6),以下操作可以正确地将stdin的所有者设置为当前进程,以便接收SIGIO中断:

import os, sys, fcntl
fcntl.fcntl(sys.stdin, fcntl.F_SETOWN, os.getpid())
但是,在OS X(10.9.2)上,默认python(2.7.5)中的同一行返回:

无论是用于fcntl的OSX手册页还是与Linux等效的手册页,还是python文档都没有提供任何帮助

发生了什么事

IOError: [Errno 25] Inappropriate ioctl for device