# HG changeset patch
# User Jan Vrany <jan.vrany@fit.cvut.cz>
# Date 1515020638 0
# Wed Jan 03 23:03:58 2018 +0000
# Branch jv
# Node ID 86d6a197fab7d3648714a96261b53c72f34ace61
# Parent fb4b4836fd7733446acb3e8f2279b46dee91530c
DBG: added missing `fflush()` after printing messages in `debug.c`
...as it looks on Windows this is required to get the messages through
pipes or what (see issue #188)
See https://swing.fit.cvut.cz/projects/stx-jv/ticket/188
diff -r fb4b4836fd77 -r 86d6a197fab7 debug.c
a
|
b
|
|
121 | 121 | " gdb attach %d\n" |
122 | 122 | "\n", |
123 | 123 | pid, pid, pid); |
| 124 | fflush(stderr); |
124 | 125 | kill(pid, SIGSTOP); |
125 | 126 | #endif |
126 | 127 | #ifdef USE_WIN32_API |
… |
… |
|
137 | 138 | " gdb attach %lu\n" |
138 | 139 | "\n", |
139 | 140 | pid, pid); |
140 | | |
| 141 | fflush(stderr); |
141 | 142 | { |
142 | 143 | int i = 0; |
143 | 144 | while (! IsDebuggerPresent() && (i < secsToWait)) { |
… |
… |
|
147 | 148 | } |
148 | 149 | if (! IsDebuggerPresent() ) { |
149 | 150 | fprintf(stderr, "debugger did not attach in 30mins, terminating()\n"); |
| 151 | fflush(stderr); |
150 | 152 | exit(0); |
151 | 153 | } |
152 | 154 | #endif |