fsautoproc
Basic file transformation automation management utility
|
File descriptor output redirection for child processes. More...
Go to the source code of this file.
Data Structures | |
struct | fdset_s |
A set of file descriptors for redirecting writes to stdout and stderr from child processes to log files. More... | |
Functions | |
int | fdinit (struct fdset_s *fds, unsigned int id) |
Initializes stdout/stderr files used for redirecting output from a child process. The file descriptors are stored in the provided file descriptor set. The files are opened in write-only mode and are created if they do not exist. If either file fails to open, the function will return -1 and both file descriptors will be set to -1. | |
void | fdclose (struct fdset_s *fds) |
Closes the stdout and stderr file descriptors in the provided file descriptor set using close(2) . If either file descriptor is already closed, the function will not attempt to close it again. | |
File descriptor output redirection for child processes.
void fdclose | ( | struct fdset_s * | fds | ) |
Closes the stdout and stderr file descriptors in the provided file descriptor set using close(2)
. If either file descriptor is already closed, the function will not attempt to close it again.
fds | The file descriptor set to close |
fdinit
before calling this function. int fdinit | ( | struct fdset_s * | fds, |
unsigned int | id ) |
Initializes stdout/stderr files used for redirecting output from a child process. The file descriptors are stored in the provided file descriptor set. The files are opened in write-only mode and are created if they do not exist. If either file fails to open, the function will return -1 and both file descriptors will be set to -1.
fds | The file descriptor set to initialize |
id | Unique identifier to append to the file name |