|
From: Thomas S. <t.s...@fz...> - 2010-06-04 17:41:55
|
without '&' the c-program waits for gnuplot to terminate and then
goes on. so it is guaranteed that gnuplot did its job when the
c-program finishes.
with '&' the c-program starts gnuplot without waiting and goes
on directly.
so it may happen that the c-program has finished while the gnuplot
process is still running in background or waits to get some cpu time.
Plotter-2 wrote:
>
> Hi,
>
> I'm not really sure this is a gnuplot problem , I'm having trouble
> seeing where the problem lies.
>
> I have a cgi responder written in C that works fine when running gnuplot
> directly but if I add "&" to the command sting it fails.
>
> I have both post.cgi and test.gnu in my cgi directory , it is called by
> lighttpd in response to a FORM post method.
>
> within post.c :
>
> system("gnuplot test.gnu" );
> OK.
> system("gnuplot test.gnu &" );
> Fails to produce output but the call returns zero since it apparently
> succeeds in creating the gnuplot process and backgrounding it before
> gnuplot fails.
>
> It looks like a permissions problem or file path but testing from
> command line it works and not backgrounding the process works for the cgi.
>
> First line in test.gnu fails to create the file:
> system("touch /www/apache/htdocs/gnuplot.ran");
>
> Equally , calling gnuplot with the full path of the .gnu file also fails.
>
> Why is gnuplot failing when I detach the process?
>
> TIA.
>
> ------------------------------------------------------------------------------
> ThinkGeek and WIRED's GeekDad team up for the Ultimate
> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
> lucky parental unit. See the prize list and enter to win:
> http://p.sf.net/sfu/thinkgeek-promo
> _______________________________________________
> gnuplot-beta mailing list
> gnu...@li...
> https://lists.sourceforge.net/lists/listinfo/gnuplot-beta
>
>
--
View this message in context: http://old.nabble.com/gnuplot-fails-in-background.-tp28780509p28783036.html
Sent from the Gnuplot - Dev mailing list archive at Nabble.com.
|