Compare commits
7
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a07a5d638d | ||
|
|
5b75dd4284 | ||
|
|
fb6b37bade | ||
|
|
b02df94744 | ||
|
|
429c772e4a | ||
|
|
fe0230b3d5 | ||
|
|
885fa3fee8 |
@@ -19,6 +19,7 @@
|
||||
<h1>[V3.4.1 -> V3.5.0] 4th February 2026<br>
|
||||
</h1>
|
||||
<ul>
|
||||
<li>Fixed non-blocking stdin polling deadlock on MSWindows anonymous pipes when running interactive measurement tools in subprocess mode.</li>
|
||||
<li>Added -d switch to printtarg to allow custom chart label strings or omit labelling entirely.</li>
|
||||
<li>Added MSWindows ARM release.</li>
|
||||
<li>Added Mac ARM release.</li>
|
||||
|
||||
+13
-12
@@ -203,36 +203,37 @@ static int con_char(int wait) {
|
||||
/* We assume pipe has been set to NOWAIT mode. */
|
||||
} else if (stdin_type == FILE_TYPE_PIPE) {
|
||||
int i, bib;
|
||||
//fprintf(stderr,"~1 top of pipe\n");
|
||||
DWORD bytes_avail = 0;
|
||||
|
||||
/* Check available bytes in pipe before blocking */
|
||||
if (!PeekNamedPipe(stdinh, NULL, 0, NULL, &bytes_avail, NULL) || bytes_avail == 0) {
|
||||
if (!wait) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
for (bib = 0; bib < 10;) {
|
||||
//fprintf(stderr,"~1 got %d in buf\n",bib);
|
||||
if (!wait) {
|
||||
if (!PeekNamedPipe(stdinh, NULL, 0, NULL, &bytes_avail, NULL) || bytes_avail == 0) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if ((!ReadFile(stdinh, buf + bib, 10 - bib, &bread, NULL) || bread == 0)
|
||||
&& !wait) {
|
||||
//fprintf(stderr,"~1 no chars waiting\n");
|
||||
break;
|
||||
}
|
||||
bib += bread;
|
||||
|
||||
for (i = 0; i < bib; i++) {
|
||||
if (buf[i] == '\n' || buf[i] == '\r' || buf[i] == 0x3) {
|
||||
//fprintf(stderr,"~1 found lf at ix %d\n",i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (i < bib) {
|
||||
//fprintf(stderr,"~1 found lf\n");
|
||||
break; /* Found '\n' */
|
||||
}
|
||||
Sleep(100); /* Wait for a line ending in '\n' */
|
||||
}
|
||||
|
||||
//if (bread > 0) {
|
||||
//fprintf(stderr,"~1 read %d: ",bread);
|
||||
//for (i = 0; i < bread; i++)
|
||||
//fprintf(stderr," 0x%x",buf[i]);
|
||||
//fprintf(stderr,"\n//");
|
||||
//}
|
||||
rv = buf[0];
|
||||
|
||||
/* Assume a file. This will have very limited functionality. */
|
||||
|
||||
Reference in New Issue
Block a user