Presumably your program is printf()-ing stuff on the screen. Once the 
stdout buffer fills up your program is paused until the parent reads the 
output, this is how stdout works. Redirect stdout to a file or use 
screen/tmux.



On Saturday, March 14, 2015 at 11:42:50 PM UTC+1, [email protected] wrote:
>
>  Hello! 
>   I have the following problem, and I do not know whether it is a bug 
> or a supposed behaviour. 
>
>   I upload a C program to my worksheet and compile it using the 
> server's GCC with this command: 
>
> os.system("cd "+DATA+" && gcc infinite_cycle.c -o infinite_cycle.bin") 
>
> Than I start the obtained binary like this: 
>
> os.system(DATA+"/infinite_cycle.bin") 
>
> It runs correctly at the first glance. However, I noticed that the 
> actual calculation (by the "infinite_cycle.bin" program) takes place 
> only when the worksheet page is opened in the web-browser. If I close 
> the tab in the browser (without stopping the worksheet process), the 
> "infinite_cycle.bin"  process "falls asleep" after several minutes. 
>   If I open the worksheet in the browser again, it continues the 
> calculation from the point it stopped before. So it happens that in 
> order to keep the compiled program working, it is necessary to have the 
> corresponding worksheet opened in the web-browser, which is extremely 
> inconvenient for the long-lasting calculations. 
>
>   So I would like to ask if it is a bug in some program, or maybe it 
> depends on some settings? 
>
>   Thanks! 
>     Vladimir 
>
> ----- 
>  <[email protected] <javascript:>> 
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.

Reply via email to