basic: move acquire_data_fd() and fd_duplicate_data_fd() to new data-fd-util.c

fd_duplicate_data_fd() is renamed to copy_data_fd(). This makes
the two functions have nicely similar names.

Now fd-util.[ch] is again about low-level file descriptor manipulations.
copy_data_fd() is a complex function that internally wraps the other
functions in copy.c. I want to move copy.c and the whole cluster of
related code from basic/ to shared/ later on, and this is a preparatory
step for that.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2021-06-24 10:05:22 +02:00
parent 37350b81b5
commit 6a818c3cb4
14 changed files with 522 additions and 482 deletions
-4
View File
@@ -76,10 +76,6 @@ enum {
ACQUIRE_NO_REGULAR = 1 << 4,
};
int acquire_data_fd(const void *data, size_t size, unsigned flags);
int fd_duplicate_data_fd(int fd);
int fd_move_above_stdio(int fd);
int rearrange_stdio(int original_input_fd, int original_output_fd, int original_error_fd);