pike.git / lib / modules / Process.pmod

version» Context lines:

pike.git/lib/modules/Process.pmod:215:    ]));      #if constant(Thread.Thread)    array threads = ({    thread_create( lambda() { gotstdout = mystdout->read(); } ),    thread_create( lambda() { gotstderr = mystderr->read(); } )    });       if (mystdin) {    threads += ({ -  thread_create(lambda() { mystdin->write(stdin_str); } ) +  thread_create(lambda(Stdio.File f) { f->write(stdin_str); }, mystdin )    });    mystdin = 0;    }       exitcode = p->wait();    threads->wait();   #else //No threads, use callbacks    mystdout->set_read_callback( lambda( mixed i, string data) {    gotstdout += data;    } );