Skip to content

Commit

Permalink
cleanup fd.h docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
Cryptkeeper committed Jul 11, 2024
1 parent 6452f5d commit b0bc1d8
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions include/fd.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,17 @@ struct fdset_s {

/// @brief `fdinit()` initializes the stdout/stderr files used for redirecting
/// output from a child process. The file descriptors are stored in the provided
/// file descriptor set. The file descriptors are opened in write-only mode and
/// are created if they do not exist. If either file descriptor fails to open,
/// the function will return -1 and the file descriptors will be set to -1.
/// 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.
/// @param fds The file descriptor set to initialize
/// @param id Unique identifier to append to the file name
/// @return 0 if both files were opened successfully, otherwise -1
int fdinit(struct fdset_s* fds, unsigned int id);

/// @brief `fdclose()` closes the stdout and stderr file descriptors in the
/// provided file descriptor set.
/// provided file descriptor set using `close(2)` of a file descriptor set
/// successfully initialized by `fdinit()`.
void fdclose(struct fdset_s* fds);

#endif//FSAUTOPROC_FD_H

0 comments on commit b0bc1d8

Please sign in to comment.