diff options
author | Joel Rosdahl <joel@rosdahl.net> | 2014-11-15 13:50:49 +0100 |
---|---|---|
committer | Joel Rosdahl <joel@rosdahl.net> | 2014-11-15 15:23:44 +0100 |
commit | c5552d3f757b00212e35eeafd033e1343f46b5ce (patch) | |
tree | b40c9f1b5f4a37e17487d8539c373e37d78c582e /ccache.h | |
parent | fc61ca9a9232f26ee3f714d4b8738d916f6948ff (diff) | |
download | ccache-c5552d3f757b00212e35eeafd033e1343f46b5ce.tar.gz |
Improve execute() to take FDs instead of filenames
This means that execute() no longer needs to recreate the temporary
stdout/stderr files needlessly.
Note: ccache will no longer build on win32 after this change, but I don't
know what needs to be done to win32execute(). I leave that to those who
know.
Diffstat (limited to 'ccache.h')
-rw-r--r-- | ccache.h | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -209,9 +209,7 @@ void wipe_all(struct conf *conf); /* ------------------------------------------------------------------------- */ /* execute.c */ -int execute(char **argv, - const char *path_stdout, - const char *path_stderr); +int execute(char **argv, int fd_out, int fd_err); char *find_executable(const char *name, const char *exclude_name); void print_command(FILE *fp, char **argv); @@ -262,6 +260,7 @@ int win32execute(char *path, char **argv, int doreturn, # define link(src,dst) (CreateHardLink(dst,src,NULL) ? 0 : -1) # define lstat(a,b) stat(a,b) # define execv(a,b) win32execute(a,b,0,NULL,NULL) +#error TODO: Adapt win32execute to new execute API # define execute(a,b,c) win32execute(*(a),a,1,b,c) # define PATH_DELIM ";" # define F_RDLCK 0 |