Francois Gouget : testbot/testagentd: Allow reading, writing and deleting the run command redirect files.
Alexandre Julliard
julliard at winehq.org
Mon Feb 25 14:02:21 CST 2013
Module: tools
Branch: master
Commit: 2b6cf2889054a8fdf5117795480d515ae8915330
URL: http://source.winehq.org/git/tools.git/?a=commit;h=2b6cf2889054a8fdf5117795480d515ae8915330
Author: Francois Gouget <fgouget at codeweavers.com>
Date: Mon Feb 25 17:35:16 2013 +0100
testbot/testagentd: Allow reading, writing and deleting the run command redirect files.
In particular if we send stdout or stderr to a log, it's important that we can read it even if the command gets stuck.
---
testbot/src/testagentd/platform_windows.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/testbot/src/testagentd/platform_windows.c b/testbot/src/testagentd/platform_windows.c
index 55ed51d..9e5bf78 100644
--- a/testbot/src/testagentd/platform_windows.c
+++ b/testbot/src/testagentd/platform_windows.c
@@ -88,7 +88,7 @@ uint64_t platform_run(char** argv, uint32_t flags, char** redirects)
continue;
}
has_redirects = 1;
- fhs[i] = CreateFile(redirects[i], (i ? GENERIC_WRITE : GENERIC_READ), 0, &sa, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
+ fhs[i] = CreateFile(redirects[i], (i ? GENERIC_WRITE : GENERIC_READ), FILE_SHARE_DELETE | FILE_SHARE_READ | FILE_SHARE_WRITE, &sa, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
if (fhs[i] == INVALID_HANDLE_VALUE)
{
set_status(ST_ERROR, "unable to open '%s' for %s: %lu", redirects[i], i ? "writing" : "reading", GetLastError());
More information about the wine-cvs
mailing list