$sid = $2;
$pid = $3;
- if ( not Maasha::Common::process_running( $pid ) )
+ if ( $user eq Maasha::Common::get_user() )
{
- # print STDERR "Removing stale dir: $dir\n";
- Maasha::Common::dir_remove( $dir );
- }
- elsif ( $pid == $curr_pid )
- {
- # print STDERR "Removing current dir: $dir\n";
- Maasha::Common::dir_remove( $dir );
+ if ( not Maasha::Common::process_running( $pid ) )
+ {
+ # print STDERR "Removing stale dir: $dir\n";
+ Maasha::Common::dir_remove( $dir );
+ }
+ elsif ( $pid == $curr_pid )
+ {
+ # print STDERR "Removing current dir: $dir\n";
+ Maasha::Common::dir_remove( $dir );
+ }
}
}
}