From 62cb9b70b1682156c8f8a160eb18604b2226a5b2 Mon Sep 17 00:00:00 2001 From: ruki Date: Tue, 23 May 2017 15:29:22 +0800 Subject: fix os.iorunv and process bug with multi-jobs --- core/src/xmake/process/open.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'core/src/xmake/process/open.c') diff --git a/core/src/xmake/process/open.c b/core/src/xmake/process/open.c index b7ce59f52..2365ee7ba 100644 --- a/core/src/xmake/process/open.c +++ b/core/src/xmake/process/open.c @@ -59,11 +59,7 @@ tb_int_t xm_process_open(lua_State* lua) { // redirect stdout to file attr.outfile = outfile; - attr.outmode = TB_FILE_MODE_WO | TB_FILE_MODE_TRUNC | TB_FILE_MODE_CREAT; - - // remove the outfile first - // if (tb_file_info(outfile, tb_null)) - // tb_file_remove(outfile); + attr.outmode = TB_FILE_MODE_RW | TB_FILE_MODE_TRUNC | TB_FILE_MODE_CREAT; } // redirect stderr? @@ -71,11 +67,7 @@ tb_int_t xm_process_open(lua_State* lua) { // redirect stderr to file attr.errfile = errfile; - attr.errmode = TB_FILE_MODE_WO | TB_FILE_MODE_TRUNC | TB_FILE_MODE_CREAT; - - // remove the errfile first - // if (tb_file_info(errfile, tb_null)) - // tb_file_remove(errfile); + attr.errmode = TB_FILE_MODE_RW | TB_FILE_MODE_TRUNC | TB_FILE_MODE_CREAT; } // init process -- cgit v1.3.1