Re: cgi-script shell script wrapping question

2010-12-28 Thread Lev Olshvang
Hi, I would go to the javascript wrapper solution : I would wrap cgi-script to send javascript code to browser and then redirect original script output to the html file In a javascript I would loop (and sleep) until load of html file will succeed. On 12/27/2010 08:26 PM, Dov Grobgeld wrot

Re: cgi-script shell script wrapping question

2010-12-27 Thread Dov Grobgeld
Thanks for the help! Based on it I tried running the command with python as follows: import subprocess pipe = subprocess.Popen("do_slow_command 2>&1", bufsize=1, stdout=subprocess.PIPE, stdin=subprocess.PIPE, shell=True) for p in pipe.stdout.readlines(): p

Re: cgi-script shell script wrapping question

2010-12-27 Thread ik
2010/12/27 shimi > > > 2010/12/27 Dov Grobgeld > >> I'm trying to write a cgi wrapper for a long running command. The command >> takes about 10minutes to execute and when running it from the command line >> it continously outputs text to stdout. A simplistic cgi-bin wrapper that >> tries to exec

Re: cgi-script shell script wrapping question

2010-12-27 Thread shimi
2010/12/27 Dov Grobgeld > I'm trying to write a cgi wrapper for a long running command. The command > takes about 10minutes to execute and when running it from the command line > it continously outputs text to stdout. A simplistic cgi-bin wrapper that > tries to execute the script and then writes

Re: cgi-script shell script wrapping question

2010-12-27 Thread ik
If you can send once in a while data to the output of the cgi, but not to finish the execution so it's pipe to the HTTP server will not terminate and the request will not end, then it should work, because there is a response, it's just keep on going, however if you do not send a thing, then the tim

cgi-script shell script wrapping question

2010-12-27 Thread Dov Grobgeld
I'm trying to write a cgi wrapper for a long running command. The command takes about 10minutes to execute and when running it from the command line it continously outputs text to stdout. A simplistic cgi-bin wrapper that tries to execute the script and then writes that it is done fails with the fo