Fossil SCM
adding flush to system-command, windows needs all buffers flushed before system execution
Commit
a64b48cb2916d67bc0a061782c15b38536e29f20
Parent
a94ef5c00dd9e64…
1 file changed
+1
+1
| --- src/diffcmd.c | ||
| +++ src/diffcmd.c | ||
| @@ -35,10 +35,11 @@ | ||
| 35 | 35 | #if defined(_WIN32) |
| 36 | 36 | /* On windows, we have to put double-quotes around the entire command. |
| 37 | 37 | ** Who knows why - this is just the way windows works. |
| 38 | 38 | */ |
| 39 | 39 | char *zNewCmd = mprintf("\"%s\"", zOrigCmd); |
| 40 | + fflush(0); | |
| 40 | 41 | rc = system(zNewCmd); |
| 41 | 42 | free(zNewCmd); |
| 42 | 43 | #else |
| 43 | 44 | /* On unix, evaluate the command directly. |
| 44 | 45 | */ |
| 45 | 46 |
| --- 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 |