[PATCH v2 81/94] run-command: make dup_devnull() non static
- From
Christian Couder <christian.couder@gmail.com>
- Date
- May 11, 2016, 13:17 UTC
- Message-ID
- <20160511131745.2914-82-chriscool@tuxfamily.org>
- In-Reply-To
- <20160511131745.2914-1-chriscool@tuxfamily.org>
We will need this function in a later commit to redirect stdout and stderr to /dev/null.
Helped-by: Johannes Sixt <j6t@kdbg.org> Helped-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Christian Couder <chriscool@tuxfamily.org> --- run-command.c | 2 +- run-command.h | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/run-command.c b/run-command.c index e4593cd..5d1cedf 100644 --- a/run-command.c +++ b/run-command.c @@ -85,7 +85,7 @@ static inline void close_pair(int fd[2]) } #ifndef GIT_WINDOWS_NATIVE -static inline void dup_devnull(int to) +void dup_devnull(int to) { int fd = open("/dev/null", O_RDWR); if (fd < 0) diff --git a/run-command.h b/run-command.h index 11f76b0..e05ce7d 100644 --- a/run-command.h +++ b/run-command.h @@ -201,4 +201,10 @@ int run_processes_parallel(int n, task_finished_fn, void *pp_cb); +/** + * Misc helper functions + */ + +void dup_devnull(int to); + #endif
-- 2.8.2.490.g3dabe57