Hello, I'm running a DOS mode text program under Wine via a Mac OSX Objective-C/Cocoa program. I use NSTask to run Wine and capture stdin, stdout and stderr via NSPipes. I'm having an issue where output from the DOS mode text program doesn't get to the Objective-C/Cocoa program until after the program ends in Wine. I think this is happening because stdout is buffered. Is there a way to cause Wine to treat stdout and stderr as unbuffered? Thanks, -- Dan
dkok wrote:> Hello, > > I'm running a DOS mode text program under Wine via a Mac OSX Objective-C/Cocoa program. I use NSTask to run Wine and capture stdin, stdout and stderr via NSPipes. I'm having an issue where output from the DOS mode text program doesn't get to the Objective-C/Cocoa program until after the program ends in Wine. I think this is happening because stdout is buffered. > > Is there a way to cause Wine to treat stdout and stderr as unbuffered? >Not that I know of. However, you might have more luck using Dosbox or another DOS emulator on your Mac. Wine is a Windows API setup and does not run command line DOS programs very well. James McKenzie
James McKenzie wrote:> dkok wrote: > > > Hello, > > > > I'm running a DOS mode text program under Wine via a Mac OSX Objective-C/Cocoa program. I use NSTask to run Wine and capture stdin, stdout and stderr via NSPipes. I'm having an issue where output from the DOS mode text program doesn't get to the Objective-C/Cocoa program until after the program ends in Wine. I think this is happening because stdout is buffered. > > > > Is there a way to cause Wine to treat stdout and stderr as unbuffered? > > > > > Not that I know of. However, you might have more luck using Dosbox or > another DOS emulator on your Mac. Wine is a Windows API setup and does > not run command line DOS programs very well. > > James McKenzieJames, Thanks for your reply. DOSBox is a great idea and I just tried it. Unfortunately while the program only runs at a command prompt, running it under DOSBox produces the message "This program cannot be run in DOS mode." It apparently requires some of the Win32 API, even though it is not graphical. -- Dan
Reasonably Related Threads
- Crashes maybe due to: "error writing 4 unbuffered bytes"
- error writing 4 unbuffered bytes - exiting: Broken pipe
- performance problem with 3.2.8: unbuffered reads for some users
- compare two data frames of different dimensions and only keep unique rows
- --log-file=File output