Found a workaround by looking in osproc source:
    
    
    import osproc, streams
    
    var exeName = "sayhello"
    
    when defined(windows):
        exeName &= ".exe."
    
    echo "exeName=",exeName
    
    var tstprc = startProcess(exeName,"",[],nil,{
        poEvalCommand})
    
    var tstouthdl = tstprc.outputStream()
    
    var line = newStringOfCap(120).TaintedString
    
    while true:
        if tstouthdl.readLine(line):
            echo "piped:",line
        elif not running(tstprc): break
    
    close(tstprc)
    
    
    Run

This uses a Stream instead of a FileHandle and a pre-created line buffer.

Still not sure why a Stream works but a File does not! The different po-option 
did not cure the problem Adding the exe file name extension to exeName did not 
help either.

Reply via email to