eric pouech (@epo) commented about programs/cmd/builtins.c:
}
if (bytesread) {
ok = WriteFile(out, buffer, bytesread, &byteswritten, NULL);
if (!ok || byteswritten != bytesread) {
WINE_ERR("Unexpected failure writing, rc=%ld\n",
GetLastError());
}
}
} else {
WINE_ERR("Unexpected failure reading, rc=%ld\n",
GetLastError());
}
- } while (ok && bytesread > 0);
- return ok;
it seems to me that this will continue to read after the ctrl-z (it just drops the bytes in buffer after ctrl-z, but doesn't stop reading next buffer) this looks like a bug in existing code, but worth fixing (potentially in a separate patch)