module documentation
Utility functions wrapping other functions.
Function |
|
Close a file descriptor ignoring errors. |
Function |
|
Creates a temporary file and returns its path. |
Function |
|
Ignores ESRCH when calling a process-related function. |
Function |
|
Tries to call a function ignoring failures due to EINTR. |
Function |
|
Checks whether a file exists and is executable. |
Function |
|
Resets the random name generator of the tempfile module. |
Function |
|
Calls a function again if it failed due to EINTR. |
Function |
|
Sets or unsets the close-on-exec flag on a file descriptor. |
Function |
|
Sets or unsets the O_NONBLOCK flag on on a file descriptor. |
Function |
|
Sleep for a fixed amount of time. |
Close a file descriptor ignoring errors.
Parameters | |
fd:int | the file descriptor |
retries:int | how many retries to make, in case we get any other error than EBADF |
Ignores ESRCH when calling a process-related function.
ESRCH is raised when a process is not found.
Returns | |
bool | Whether process was found |
Checks whether a file exists and is executable.
Parameters | |
filename:string | Filename |
Returns | |
bool | Undocumented |
Resets the random name generator of the tempfile module.
This function should be called after os.fork in the child process to ensure it creates a newly seeded random generator. Otherwise it would generate the same random parts as the parent process. If several processes race for the creation of a temporary file, this could lead to one not getting a temporary name.
Sets or unsets the close-on-exec flag on a file descriptor.
Parameters | |
fd:int | File descriptor |
enable:bool | Whether to set or unset it. |
Sets or unsets the O_NONBLOCK flag on on a file descriptor.
Parameters | |
fd:int | File descriptor |
enable:bool | Whether to set or unset it |