Fossil SCM

adding flush to system-command, windows needs all buffers flushed before system execution

wolfgang 2010-10-19 14:55 StvPrivateHook2
Commit a64b48cb2916d67bc0a061782c15b38536e29f20
1 file changed +1
--- src/diffcmd.c
+++ src/diffcmd.c
@@ -35,10 +35,11 @@
3535
#if defined(_WIN32)
3636
/* On windows, we have to put double-quotes around the entire command.
3737
** Who knows why - this is just the way windows works.
3838
*/
3939
char *zNewCmd = mprintf("\"%s\"", zOrigCmd);
40
+ fflush(0);
4041
rc = system(zNewCmd);
4142
free(zNewCmd);
4243
#else
4344
/* On unix, evaluate the command directly.
4445
*/
4546
--- src/diffcmd.c
+++ src/diffcmd.c
@@ -35,10 +35,11 @@
35 #if defined(_WIN32)
36 /* On windows, we have to put double-quotes around the entire command.
37 ** Who knows why - this is just the way windows works.
38 */
39 char *zNewCmd = mprintf("\"%s\"", zOrigCmd);
 
40 rc = system(zNewCmd);
41 free(zNewCmd);
42 #else
43 /* On unix, evaluate the command directly.
44 */
45
--- src/diffcmd.c
+++ src/diffcmd.c
@@ -35,10 +35,11 @@
35 #if defined(_WIN32)
36 /* On windows, we have to put double-quotes around the entire command.
37 ** Who knows why - this is just the way windows works.
38 */
39 char *zNewCmd = mprintf("\"%s\"", zOrigCmd);
40 fflush(0);
41 rc = system(zNewCmd);
42 free(zNewCmd);
43 #else
44 /* On unix, evaluate the command directly.
45 */
46

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button