question on zenity centos 5

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



>>On 5/21/07 1:58 PM, "Jerry Geis" <geisj at pagestation.com> spake:

>>...
>> 
>> When I use a little program.
>>                 for(count = 0; count <= 100; count += 10)
>>                         {
>>                         printf(stdout, "%d\n", count);
>>                         sleep(1);
>>                         }
>>... 

>Try adding this after your printf():

>fflush(stdout);

>The stdio functions use buffered output, so it's likely that zenity is just
>not getting any of the output until the program has completed. By doing an
>fflush() you will force the data to be flushed from the buffer and printed,
>so that zenity can pick it up from the pipe.

>Ryan

That did it... THanks so much.

Jerry

_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux