mirror of
https://sourceware.org/git/glibc.git
synced 2026-01-06 11:51:29 +03:00
support: Add support_open_dev_null_range
It returns a range of file descriptor referring to the '/dev/null' pathname. The function takes care of restarting the open range if a file descriptor is found within the specified range and also increases RLIMIT_NOFILE if required. Checked on x86_64-linux-gnu.
This commit is contained in:
@@ -193,6 +193,14 @@ struct support_stack support_stack_alloc (size_t size);
|
||||
/* Deallocate the STACK. */
|
||||
void support_stack_free (struct support_stack *stack);
|
||||
|
||||
|
||||
/* Create a range of NUM opened '/dev/null' file descriptors using FLAGS and
|
||||
MODE. The function takes care of restarting the open range if a file
|
||||
descriptor is found within the specified range and also increases
|
||||
RLIMIT_NOFILE if required.
|
||||
The returned value is the lowest file descriptor number. */
|
||||
int support_open_dev_null_range (int num, int flags, mode_t mode);
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#endif /* SUPPORT_H */
|
||||
|
||||
Reference in New Issue
Block a user