Unbuffered stdout?

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
dkok
Newbie
Newbie
Posts: 2
Joined: Wed Sep 17, 2008 9:57 pm

Unbuffered stdout?

Post by dkok »

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
James McKenzie

Unbuffered stdout?

Post by James McKenzie »

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
dkok
Newbie
Newbie
Posts: 2
Joined: Wed Sep 17, 2008 9:57 pm

Re: Unbuffered stdout?

Post by dkok »

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 McKenzie
James,

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
Locked