Stdio.stdin + backend in windows not working

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Stdio.stdin + backend in windows not working

Marc dirix-3
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>

Loading...