oshelp.py
来自「xen虚拟机源代码安装包」· Python 代码 · 共 21 行
PY
21 行
import fcntlimport osdef fcntl_setfd_cloexec(file, bool): f = fcntl.fcntl(file, fcntl.F_GETFD) if bool: f |= fcntl.FD_CLOEXEC else: f &= ~fcntl.FD_CLOEXEC fcntl.fcntl(file, fcntl.F_SETFD)def waitstatus_description(st): if os.WIFEXITED(st): es = os.WEXITSTATUS(st) if es: return "exited with nonzero status %i" % es else: return "exited" elif os.WIFSIGNALED(st): s = "died due to signal %i" % os.WTERMSIG(st) if os.WCOREDUMP(st): s += " (core dumped)" return s else: return "failed with unexpected wait status %i" % st
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?