sub csv_status : Runmode { my $self = shift; my $id = $self->session->id(); my $path = $CFG{'CSV_TEMP'}; my $still_running = 0; if ( -e "$path/$id/csv.pid" ) { open my $in, '<', "$path/$user/csv.pid" or die "can't access $user/csv.pid file : $!"; my $pid = <$in>; close $in; if ( IsStillRunning($pid) ) { $still_running = 1; } else { $still_running = 0; } } my $template = $self->load_tmpl('csv_status.html'); $template->param( TITLE => "CSV Status", STILL_RUNNING => $still_running,, ); return $template->output; }