Stdio.stdin + backend in windows not working
Marc dirix <[email protected]> Tue, 11 Apr 2017 09:22:51 +0000
| Newsgroups | gmane.comp.lang.pike.user |
|---|---|
| Message-ID | <CAERi-x0ZJfC-5sFvnnv6RzpkTLYoMWYE_bKmpPpSVMPH1vzWBA@mail.gmail.com> |
Hello,
I have a short example script listed below. Under Linux (pike 8.0) this
script works and Output is copied on Stdio.stdout. But in windows I get the
following error notice while starting the script:
/home/zino/hack/pike8-rel/pike/src/backend.cmod:5496: Fatal error:
Filedescriptor 0 (IS CONSOLE) caused fatal error 10038 in backend.
Backtrace at time of fatal:
-:1: Pike.Backend(0)->`()(3600.0)
Removing the line "Stdio.stdin->set_read_callback(readInput);" makes the
script run, and "Bla" is written on output.
Any ideas how to create a working script?
<code>
int main() {
call_out(test,10);
Stdio.stdin->set_read_callback(readInput);
return -1;
}
void test()
{
write("Bla\n");
}
void readInput(mixed a, string d)
{
write(d+"\n");
}
</code>