Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Browser Hangs while process run in background

1 view
Skip to first unread message

praveenzx

unread,
Oct 2, 2008, 2:53:45 AM10/2/08
to
i tried to run a command(background process), ie like `perl command
2>&1 > /dev/null &` ,

command will execute perl script and will run some Linux command like
lvcreate , dd_rescue and lvremove and some file write operations,

i thought that the command will run in background .
and so that i can load my browser with the message that its under
progress ,

but its not happening , my browser loads partially and waiting for the
process to get completed.

i don't want my browser to wait for that process to get completed ..

can any one advice me to solve this problem ,

Dave Turner

unread,
Oct 2, 2008, 11:11:19 AM10/2/08
to

Have you tried |++ toward the top of your program? It could be a
buffering problem, but that's only a guess.

Joe Smith

unread,
Oct 4, 2008, 6:31:10 AM10/4/08
to
praveenzx wrote:
> i tried to run a command(background process), ie like `perl command
> 2>&1 > /dev/null &` ,

1) You've got 2>&1 in the wrong position to send STDERR to /dev/null.
2) You forgot about STDIN still being connected to the CGI program.
3) You're using qx`` instead of system().

system 'perl command </dev/null >/dev/null 2>&1 &';
or
system 'setsid perl command </dev/null >/dev/null 2>&1 &';


-Joe

0 new messages