[Cbc] Forcing output to be line buffered?

John Forrest john.forrest at fastercoin.com
Sat Oct 3 13:33:39 EDT 2015


So that you don't have to modify distributed code, I could add

#ifdef FLUSH_PRINT_BUFFER
    fflush(fp_);
#endif

and then it would be a configure option.

What do people think?

John Forrest

On 03/10/15 15:51, design at np-soft.ru wrote:
> I have the same problem with cbc.exe.
> You can add follow row to the CoinMessageHandler::print() in the 
> file CoinMessageHandler.cpp:
>   fflush(fp_);
> This row must be inserted before return 0;
> 03.10.2015, 17:15, "Jack Dunn" <jack.dunn.nz at gmail.com>:
>> Hi,
>> I'm running Cbc in a pipe to capture stdout/stderr, and I want to 
>> display the solve process in real-time. It seems like Cbc switches to 
>> using a 4K buffer rather than line-buffered writes when it detects it 
>> isn't running interactively. Is there a way to force Cbc's writes to 
>> be line-buffered? I want to avoid having to run the command through a 
>> pseudo tty if possible.
>> Thanks,
>> Jack
>> ,
>>
>> _______________________________________________
>> Cbc mailing list
>> Cbc at list.coin-or.org <mailto:Cbc at list.coin-or.org>
>> http://list.coin-or.org/mailman/listinfo/cbc
>>
>
>
> _______________________________________________
> Cbc mailing list
> Cbc at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/cbc

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/cbc/attachments/20151003/92e6470f/attachment.html>


More information about the Cbc mailing list