network/netstress: fix stdout/stderr log file flags and mode
PATCH 1/1 network/netstress: fix stdout/stderr log file flags and mode
* fix access mode for stdout/stderr
* add a write bit to the mode so that the next time the server starts, it doesn't fail with EACCES because the log file already exists and has read-only permissions.
Signed-off-by Alexey Kodanev <[email protected]>
--- testcases/network/netstress/netstress.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
testcases/network/netstress/netstress.c +1 -1
@@ -723,7 +723,7 @@ static void move_to_background(void)close (STDOUT_FILENO );close (STDERR_FILENO ); -int fd =SAFE_OPEN (log_path,O_CREAT |O_TRUNC |O_RDONLY ,00444 ); +int fd =SAFE_OPEN (log_path,O_CREAT |O_TRUNC |O_WRONLY ,0644 );SAFE_DUP (fd); }
Signature · 1 line
2.25.1
PATCH 1/1 network/netstress: fix stdout/stderr log file flags and mode