Message2871
Here's a standalone C program with the same symptom:
#include <process.h>
#include <stdio.h>
static FILE* fp;
void
reader(void* irrelevant)
{
char buf[100];
for (;;) {
char* p = fgets(buf, sizeof buf, fp);
if (p) {
putchar('r');
}
}
}
void
main()
{
int i;
char string[100];
for (i = 0; i < sizeof(string) - 1; ++i) {
string[i] = 'x';
}
string[sizeof(string) - 1] = '\n';
fp = fopen("whatever", "w+");
_beginthread(reader, 0, NULL);
for (;;) {
fwrite(string, 1, sizeof(string), fp);
putchar('w');
}
}
|
|
Date |
User |
Action |
Args |
2007-08-23 13:52:40 | admin | link | issue228210 messages |
2007-08-23 13:52:40 | admin | create | |
|