Index: /branches/eam_branches/ipp-pstamp-20260421/pstamp/scripts/detect_query_read
===================================================================
--- /branches/eam_branches/ipp-pstamp-20260421/pstamp/scripts/detect_query_read	(revision 43051)
+++ /branches/eam_branches/ipp-pstamp-20260421/pstamp/scripts/detect_query_read	(revision 43052)
@@ -20,5 +20,6 @@
 use Math::Trig;
 use Data::Dumper;
-use IPC::Cmd 0.36 qw( can_run run );
+use IPC::Cmd 0.36 qw( can_run );
+use PS::IPP::Config qw( :standard ps_run );
 
 use constant EXTNAME => 'MOPS_DETECTABILITY_QUERY'; # Extension name for table
@@ -195,5 +196,5 @@
 	    my $cmd = "$regtool -processedexp -dbname $dbname -exp_name $colData{FPA_ID}[$i]";
 	    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-		run(command => $cmd, verbose => 0);
+		ps_run(command => $cmd, verbose => 0);
 	    unless ($success) {
 		# This is a problem, because I'm not sure how we handle a failure to read something.
@@ -267,5 +268,5 @@
 	}
 	my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-	    run(command => $cmd, verbose => 1);
+	    ps_run(command => $cmd, verbose => 1);
 	unless ($success) {
 	    # This is a problem, because I'm not sure how we handle a failure to read something.
Index: /branches/eam_branches/ipp-pstamp-20260421/pstamp/scripts/detectability_respond.pl
===================================================================
--- /branches/eam_branches/ipp-pstamp-20260421/pstamp/scripts/detectability_respond.pl	(revision 43051)
+++ /branches/eam_branches/ipp-pstamp-20260421/pstamp/scripts/detectability_respond.pl	(revision 43052)
@@ -13,5 +13,5 @@
 use File::Basename;
 use File::Copy;
-use IPC::Cmd 0.36 qw( can_run run );
+use IPC::Cmd 0.36 qw( can_run );
 use Getopt::Long qw( GetOptions );
 use Pod::Usage qw( pod2usage );
@@ -20,5 +20,5 @@
 use PS::IPP::PStamp::RequestFile qw( :standard );
 use PS::IPP::PStamp::Job qw( :standard );
-use PS::IPP::Config qw( :standard );
+use PS::IPP::Config qw( :standard ps_run );
 use PS::IPP::Metadata::List qw( parse_md_list );
 
@@ -108,5 +108,5 @@
     my $dqr_command = "$detect_query_read --dbname $imagedb --input $request_file";
     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-	run(command => $dqr_command, verbose => $verbose);
+	ps_run(command => $dqr_command, verbose => $verbose);
     unless ($success) {
 	# This is a problem, because I'm not sure how we handle a failure to read something.
@@ -433,5 +433,5 @@
 	my $command = "ppCoord -astrom $catalog -radec $coordname";
 	my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-	    run(command => $command, verbose => $verbose);
+	    ps_run(command => $command, verbose => $verbose);
 	unless ($success) {
 	    my_die("Unable to perform $command. Error_code: $error_code",
@@ -473,5 +473,5 @@
 	
 	( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-	    run(command => $psphot_cmd, verbose => $verbose);
+	    ps_run(command => $psphot_cmd, verbose => $verbose);
 	unless ($success) {
 	    $query{$fpa_id}{PROC_ERROR}[$index] = $PSTAMP_SYSTEM_ERROR;
@@ -828,5 +828,5 @@
 
     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-	run(command => $command, verbose => $verbose);
+	ps_run(command => $command, verbose => $verbose);
     unless ($success) {
         my $rc = $error_code >> 8;
Index: /branches/eam_branches/ipp-pstamp-20260421/pstamp/scripts/dquery_finish.pl
===================================================================
--- /branches/eam_branches/ipp-pstamp-20260421/pstamp/scripts/dquery_finish.pl	(revision 43051)
+++ /branches/eam_branches/ipp-pstamp-20260421/pstamp/scripts/dquery_finish.pl	(revision 43052)
@@ -10,5 +10,5 @@
 
 use Sys::Hostname;
-use IPC::Cmd 0.36 qw( can_run run );
+use IPC::Cmd 0.36 qw( can_run );
 use File::Temp qw( tempfile );
 use File::Copy;
@@ -20,5 +20,5 @@
 use PS::IPP::Metadata::List qw( parse_md_list );
 
-use PS::IPP::Config qw( :standard );
+use PS::IPP::Config qw( :standard ps_run );
 
 my ( $req_id, $req_name, $req_file, $product, $outdir, $dbname, $dbserver, $verbose, $save_temps );
@@ -95,5 +95,5 @@
     $command .= " -dbserver $dbserver" if $dbserver;
     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-        run(command => $command, verbose => $verbose);
+        ps_run(command => $command, verbose => $verbose);
     unless ($success) {
         die("Unable to perform $command error code: $error_code");
@@ -160,5 +160,5 @@
 
     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-        run(command => $command, verbose => $verbose);
+        ps_run(command => $command, verbose => $verbose);
     unless ($success) {
         $request_fault = $error_code >> 8;
@@ -388,5 +388,5 @@
     $command   .= " -dbserver $dbserver" if $dbserver;
     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-        run(command => $command, verbose => $verbose);
+        ps_run(command => $command, verbose => $verbose);
     unless ($success) {
         die("Unable to perform $command error code: $error_code");
Index: /branches/eam_branches/ipp-pstamp-20260421/pstamp/scripts/dquery_job_run.pl
===================================================================
--- /branches/eam_branches/ipp-pstamp-20260421/pstamp/scripts/dquery_job_run.pl	(revision 43051)
+++ /branches/eam_branches/ipp-pstamp-20260421/pstamp/scripts/dquery_job_run.pl	(revision 43052)
@@ -13,5 +13,5 @@
 use File::Basename;
 use File::Copy;
-use IPC::Cmd 0.36 qw( can_run run );
+use IPC::Cmd 0.36 qw( can_run );
 use Getopt::Long qw( GetOptions );
 use Pod::Usage qw( pod2usage );
@@ -20,5 +20,5 @@
 use PS::IPP::PStamp::RequestFile qw( :standard );
 use PS::IPP::PStamp::Job qw( :standard );
-use PS::IPP::Config qw( :standard );
+use PS::IPP::Config qw( :standard ps_run );
 use PS::IPP::Metadata::List qw( parse_md_list );
 
@@ -120,5 +120,5 @@
 my $command = "ppCoord -astrom $catalog -radec $coordname";
 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-    run(command => $command, verbose => $verbose);
+    ps_run(command => $command, verbose => $verbose);
 ## MEH need to adjust error_code to rc
 unless ($success) {
@@ -162,5 +162,5 @@
 
 ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-    run(command => $psphot_cmd, verbose => $verbose);
+    ps_run(command => $psphot_cmd, verbose => $verbose);
 unless ($success) {
     # $params->{PROC_ERROR} = $PSTAMP_SYSTEM_ERROR;
@@ -339,5 +339,5 @@
 
     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-	run(command => $command, verbose => $verbose);
+	ps_run(command => $command, verbose => $verbose);
     unless ($success) {
         my $rc = $error_code >> 8;
Index: /branches/eam_branches/ipp-pstamp-20260421/pstamp/scripts/dqueryparse.pl
===================================================================
--- /branches/eam_branches/ipp-pstamp-20260421/pstamp/scripts/dqueryparse.pl	(revision 43051)
+++ /branches/eam_branches/ipp-pstamp-20260421/pstamp/scripts/dqueryparse.pl	(revision 43052)
@@ -13,5 +13,5 @@
 use File::Basename;
 use File::Copy;
-use IPC::Cmd 0.36 qw( can_run run );
+use IPC::Cmd 0.36 qw( can_run );
 use Getopt::Long qw( GetOptions );
 use Pod::Usage qw( pod2usage );
@@ -21,5 +21,5 @@
 use PS::IPP::PStamp::RequestFile qw( :standard );
 use PS::IPP::PStamp::Job qw( :standard );
-use PS::IPP::Config qw( :standard );
+use PS::IPP::Config qw( :standard ps_run );
 use PS::IPP::Metadata::List qw( parse_md_list );
 
@@ -88,5 +88,5 @@
     my $command = "echo $request_file | $fields -x 0 EXTNAME EXTVER QUERY_ID";
     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-        run(command => $command, verbose => $verbose);
+        ps_run(command => $command, verbose => $verbose);
     
     $fields_output = join "", @$stdout_buf;
@@ -105,5 +105,5 @@
     # set verbose to false so that error message about request not found doesn't appear in parse_error.txt
     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-        run(command => $command, verbose => 0);
+        ps_run(command => $command, verbose => 0);
     if ($success) {
         # -listreq succeeded duplicate request name
@@ -112,5 +112,5 @@
         unless ($no_update) {
             my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-                run(command => $command, verbose => $verbose);
+                ps_run(command => $command, verbose => $verbose);
             if (!$success) {
                 my_die("$command failed", $PS_EXIT_UNKNOWN_ERROR);
@@ -126,5 +126,5 @@
     unless ($no_update) {
         ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-            run(command => $command, verbose => $verbose);
+            ps_run(command => $command, verbose => $verbose);
         unless ($success) {
             my_die("$command failed", $PS_EXIT_UNKNOWN_ERROR);
@@ -151,5 +151,5 @@
     my $dqr_command = "$detect_query_read --dbname $imagedb --input $request_file";
     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-	run(command => $dqr_command, verbose => $verbose);
+	ps_run(command => $dqr_command, verbose => $verbose);
     unless ($success) {
 	# This is a problem, because I'm not sure how we handle a failure to read something.
@@ -489,5 +489,5 @@
         unless ($no_update) {
             my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-                run(command => $command, verbose => $verbose);
+                ps_run(command => $command, verbose => $verbose);
             if ($success) {
                 my $job_id = join "", @$stdout_buf;
@@ -513,5 +513,5 @@
     unless ($no_update) {
         my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-            run(command => $command, verbose => $verbose);
+            ps_run(command => $command, verbose => $verbose);
         if ($success) {
             my $job_id = join "", @$stdout_buf;
@@ -534,5 +534,5 @@
     unless ($no_update) {
         my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-            run(command => $command, verbose => $verbose);
+            ps_run(command => $command, verbose => $verbose);
         unless ($success) {
         my_die("$command failed",$PS_EXIT_UNKNOWN_ERROR);
@@ -564,5 +564,5 @@
     if (!$no_update) {
 	my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-	    run(command => $command, verbose => $verbose);
+	    ps_run(command => $command, verbose => $verbose);
 	unless ($success) {
 	    my_die("$command failed", $PS_EXIT_UNKNOWN_ERROR);
Index: /branches/eam_branches/ipp-pstamp-20260421/pstamp/scripts/psgetcalibinfo
===================================================================
--- /branches/eam_branches/ipp-pstamp-20260421/pstamp/scripts/psgetcalibinfo	(revision 43051)
+++ /branches/eam_branches/ipp-pstamp-20260421/pstamp/scripts/psgetcalibinfo	(revision 43052)
@@ -10,5 +10,5 @@
 use Carp;
 
-use IPC::Cmd 0.36 qw( can_run run );
+use IPC::Cmd 0.36 qw( can_run );
 #use File::Temp qw( tempfile );
 #use File::Copy;
@@ -19,5 +19,5 @@
 use PS::IPP::Metadata::List qw( parse_md_list );
 
-use PS::IPP::Config qw( :standard );
+use PS::IPP::Config qw( :standard ps_run );
 #use PS::IPP::PStamp::RequestFile qw( :standard );
 #use PS::IPP::PStamp::Job qw( :standard );
@@ -55,5 +55,5 @@
     $command   .= " -dbname $dbname" if $dbname;
     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-        run(command => $command, verbose => $verbose);
+        ps_run(command => $command, verbose => $verbose);
     unless ($success) {
         die("Unable to perform $command error code: $error_code");
Index: /branches/eam_branches/ipp-pstamp-20260421/pstamp/scripts/psmkreq
===================================================================
--- /branches/eam_branches/ipp-pstamp-20260421/pstamp/scripts/psmkreq	(revision 43051)
+++ /branches/eam_branches/ipp-pstamp-20260421/pstamp/scripts/psmkreq	(revision 43052)
@@ -12,11 +12,10 @@
 use Getopt::Long qw( GetOptions ) ; # :config auto_help auto_version gnu_getopt );
 use Pod::Usage qw( pod2usage );
-use PS::IPP::Config qw( :standard );
+use PS::IPP::Config qw( :standard ps_run );
 use PS::IPP::PStamp::RequestFile qw( :standard );
 use PS::IPP::PStamp::Job qw( :standard );
 use File::Temp qw(tempfile);
 use File::Basename qw(basename);
-use Scalar::Util qw(looks_like_number);
-use IPC::Cmd 0.36 qw( can_run run );
+use IPC::Cmd 0.36 qw( can_run );
 use Carp;
 use POSIX;
@@ -296,10 +295,9 @@
     my $command = "$pstamp_request_file --input $table_def_name --req_name $req_name";
     $command .= " --output $output" if $output;
-    my ( $success, $error_msg, $full_buf, $stdout_buf, $stderr_buf ) =
-        run(command => $command, verbose => $verbose);
-    my $error_code = &parse_error_message ($success, $error_msg, $command);
+    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
+        ps_run(command => $command, verbose => $verbose);
     unless ($success) {
         print STDERR @$stderr_buf;
-        exit $error_code;
+        exit $error_code >>8;
     }
 }
@@ -450,29 +448,2 @@
 }
 
-# if the program exited normally, the exit value is returned
-# if the program exited with a signal (abort, crash, etc), PS_EXIT_PROG_ERROR (4) is returned
-# if the program failed to run, -PS_EXIT_PROG_ERROR (-4) is returned
-sub parse_error_message {
-    my $success = shift;
-    my $error_msg = shift;
-    my $command = shift;
-
-    if ($success) { return 0; }
-
-    print "raw error_msg: $error_msg\n";
-    print "full command: $command\n";
-
-    if (&looks_like_number($error_msg)) { return (($error_msg >> 8) or ($PS_EXIT_PROG_ERROR)); }
-	
-    # which of these match?
-    my ($error_code) = $error_msg =~ m/exited with value (\d+)/;
-    if (defined $error_code) { return $error_code; }
-    
-    ($error_code) = $error_msg =~ m/died with signal (\d+)/;
-#   if (defined $error_code) { return (128 + $error_code); }
-    if (defined $error_code) { return ($PS_EXIT_PROG_ERROR); }
-    
-    # probably failed to execute:
-    return (-1*$PS_EXIT_PROG_ERROR);
-}
-
Index: /branches/eam_branches/ipp-pstamp-20260421/pstamp/scripts/pstamp_checkdependent.pl
===================================================================
--- /branches/eam_branches/ipp-pstamp-20260421/pstamp/scripts/pstamp_checkdependent.pl	(revision 43051)
+++ /branches/eam_branches/ipp-pstamp-20260421/pstamp/scripts/pstamp_checkdependent.pl	(revision 43052)
@@ -15,7 +15,7 @@
 use Carp;
 use POSIX;
-use IPC::Cmd 0.36 qw( can_run run );
+use IPC::Cmd 0.36 qw( can_run );
 use PS::IPP::Metadata::List qw( parse_md_list );
-use PS::IPP::Config qw( :standard );
+use PS::IPP::Config qw( :standard ps_run );
 use PS::IPP::PStamp::RequestFile qw( :standard );
 use Carp;
@@ -156,5 +156,5 @@
     if (!$no_update) {
         my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-                    run(command => $command, verbose => $verbose);
+                    ps_run(command => $command, verbose => $verbose);
         unless ($success) {
             my_die("failed to set pstampDependent.state to 'full' dep_id: $dep_id",
@@ -312,5 +312,5 @@
                 if (!$no_update) {
                     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-                                run(command => $command, verbose => $verbose);
+                                ps_run(command => $command, verbose => $verbose);
                     unless ($success) {
                         my_die("failed to change ${stage}Run $stage_id $component from goto_cleaned to update", $PS_EXIT_UNKNOWN_ERROR);
@@ -343,5 +343,5 @@
             if (!$no_update) {
                 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-                            run(command => $command, verbose => $verbose);
+                            ps_run(command => $command, verbose => $verbose);
                 unless ($success) {
                     my_die("failed to queue ${stage}Run $stage_id $component for update", $PS_EXIT_UNKNOWN_ERROR);
@@ -360,5 +360,5 @@
             if (!$no_update) {
                 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-                            run(command => $command, verbose => $verbose);
+                            ps_run(command => $command, verbose => $verbose);
                 unless ($success) {
                     my_die("failed to change ${stage}Run $stage_id $component from goto_cleaned to update", $PS_EXIT_UNKNOWN_ERROR);
@@ -453,5 +453,5 @@
         if (!$no_update) {
             my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-                        run(command => $command, verbose => $verbose);
+                        ps_run(command => $command, verbose => $verbose);
             unless ($success) {
                 my_die("failed to change state of ${stage}Run $stage_id from goto_cleaned to update", $PS_EXIT_UNKNOWN_ERROR);
@@ -525,5 +525,5 @@
         if (!$no_update) {
             my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-                        run(command => $command, verbose => $verbose);
+                        ps_run(command => $command, verbose => $verbose);
             unless ($success) {
                 my_die("failed to queue ${stage}Run $stage_id $component for update", $PS_EXIT_UNKNOWN_ERROR);
@@ -539,5 +539,5 @@
         if (!$no_update) {
             my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-                        run(command => $command, verbose => $verbose);
+                        ps_run(command => $command, verbose => $verbose);
             unless ($success) {
                 my_die("failed to change state of ${stage}Run $stage_id to update", $PS_EXIT_UNKNOWN_ERROR);
@@ -582,5 +582,5 @@
         if (!$no_update) {
             my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-                        run(command => $command, verbose => $verbose);
+                        ps_run(command => $command, verbose => $verbose);
             unless ($success) {
                 my_die("failed to queue ${stage}Run $stage_id $component for update", $PS_EXIT_UNKNOWN_ERROR);
@@ -724,5 +724,5 @@
         if (!$no_update) {
             my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-                        run(command => $command, verbose => $verbose);
+                        ps_run(command => $command, verbose => $verbose);
             unless ($success) {
                 my_die("failed to queue ${stage}Run $stage_id $component for update", $PS_EXIT_UNKNOWN_ERROR);
@@ -737,5 +737,5 @@
         if (!$no_update) {
             my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-                        run(command => $command, verbose => $verbose);
+                        ps_run(command => $command, verbose => $verbose);
             unless ($success) {
                 my_die("failed to queue ${stage}Run $stage_id $component for update", $PS_EXIT_UNKNOWN_ERROR);
@@ -765,5 +765,5 @@
     # run the command and parse the output
     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-                run(command => $command, verbose => $verbose);
+                ps_run(command => $command, verbose => $verbose);
     unless ($success) {
         print STDERR @$stderr_buf if !$verbose;
@@ -904,5 +904,5 @@
                     if (!$no_update) {
                         my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-                            run(command => $command, verbose => $verbose);
+                            ps_run(command => $command, verbose => $verbose);
                         unless ($success) {
                             my_die("failed to set destreaked component to 'update' for ${stage}Run $stage_id $c",
@@ -936,5 +936,5 @@
     if (!$no_update) {
         my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-                    run(command => $command, verbose => $verbose);
+                    ps_run(command => $command, verbose => $verbose);
         unless ($success) {
             my_die("failed to set pstampJob.fault for dep_id: $dep_id",
@@ -970,5 +970,5 @@
     if (!$no_update) {
         my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-                    run(command => $command, verbose => $verbose);
+                    ps_run(command => $command, verbose => $verbose);
         unless ($success) {
             carp "$cmd failed";
@@ -988,5 +988,5 @@
     if (!$no_update) {
         my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-                    run(command => $command, verbose => $verbose);
+                    ps_run(command => $command, verbose => $verbose);
         unless ($success) {
             carp "$cmd failed";
Index: /branches/eam_branches/ipp-pstamp-20260421/pstamp/scripts/pstamp_cleanup.pl
===================================================================
--- /branches/eam_branches/ipp-pstamp-20260421/pstamp/scripts/pstamp_cleanup.pl	(revision 43051)
+++ /branches/eam_branches/ipp-pstamp-20260421/pstamp/scripts/pstamp_cleanup.pl	(revision 43052)
@@ -16,5 +16,5 @@
 use POSIX qw( strftime );
 use Carp;
-use IPC::Cmd 0.36 qw( can_run run );
+use IPC::Cmd 0.36 qw( can_run );
 
 use PS::IPP::Metadata::Config;
@@ -22,5 +22,5 @@
 use PS::IPP::Metadata::List qw( parse_md_list );
 
-use PS::IPP::Config qw( :standard );
+use PS::IPP::Config qw( :standard ps_run );
 use PS::IPP::PStamp::Job qw( :standard );
 
@@ -91,5 +91,5 @@
 
     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-        run(command => $command, verbose => $verbose);
+        ps_run(command => $command, verbose => $verbose);
     unless ($success) {
         my_die("Unable to perform $command error code: $error_code", $req_id, $PS_EXIT_UNKNOWN_ERROR);
@@ -102,5 +102,5 @@
     $command   .= " -dbserver $dbserver" if $dbserver;
     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-        run(command => $command, verbose => $verbose);
+        ps_run(command => $command, verbose => $verbose);
     unless ($success) {
         die("Unable to perform $command error code: $error_code");
@@ -136,5 +136,5 @@
         my $command = "find $pstamp_workdir -maxdepth 2 -type d -name $req_id";
         my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-            run(command => $command, verbose => $verbose);
+            ps_run(command => $command, verbose => $verbose);
         unless ($success) {
             my $rc = $error_code >> 8;
@@ -161,5 +161,5 @@
     unless ($no_update) {
         my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-            run(command => $command, verbose => $verbose);
+            ps_run(command => $command, verbose => $verbose);
         unless ($success) {
             die("Unable to perform $command error code: $error_code");
@@ -192,5 +192,5 @@
     unless ($no_update) {
         my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-            run(command => $command, verbose => $verbose);
+            ps_run(command => $command, verbose => $verbose);
         unless ($success) {
             if (-e $dir) {
@@ -219,5 +219,5 @@
     unless ($no_update) {
         my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-            run(command => $command, verbose => $verbose);
+            ps_run(command => $command, verbose => $verbose);
         unless ($success) {
             die("Unable to perform $command error code: $error_code");
Index: /branches/eam_branches/ipp-pstamp-20260421/pstamp/scripts/pstamp_dorequest.pl
===================================================================
--- /branches/eam_branches/ipp-pstamp-20260421/pstamp/scripts/pstamp_dorequest.pl	(revision 43051)
+++ /branches/eam_branches/ipp-pstamp-20260421/pstamp/scripts/pstamp_dorequest.pl	(revision 43052)
@@ -28,5 +28,5 @@
 }
 
-use IPC::Cmd 0.36 qw( can_run run );
+use IPC::Cmd 0.36 qw( can_run );
 
 use PS::IPP::Metadata::Config;
@@ -44,4 +44,5 @@
 		       metadataLookupBool
 		       caturi
+		       ps_run
 		       );
 
@@ -63,5 +64,5 @@
     my $command = "$pstamptool -pendingjob";
     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-        run(command => $command, verbose => $verbosity);
+        ps_run(command => $command, verbose => $verbosity);
     unless ($success) {
         die("Unable to perform pstamptool -pendingreq: $error_code");
@@ -94,5 +95,5 @@
     my $command = "$ppstamp_run $job->{job_id}";
     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-        run(command => $command, verbose => $verbosity);
+        ps_run(command => $command, verbose => $verbosity);
     unless ($success) {
         die("Unable to perform $command: $error_code");
@@ -108,5 +109,5 @@
     my $command = "$pstamptool -updatereq -req_id $request_id -set_state stop"; 
     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-        run(command => $command, verbose => $verbosity);
+        ps_run(command => $command, verbose => $verbosity);
     unless ($success) {
         die("Unable to perform pstamptool -updatereq: $error_code");
Index: /branches/eam_branches/ipp-pstamp-20260421/pstamp/scripts/pstamp_finish.pl
===================================================================
--- /branches/eam_branches/ipp-pstamp-20260421/pstamp/scripts/pstamp_finish.pl	(revision 43051)
+++ /branches/eam_branches/ipp-pstamp-20260421/pstamp/scripts/pstamp_finish.pl	(revision 43052)
@@ -12,9 +12,8 @@
 use Time::Local;
 use Sys::Hostname;
-use IPC::Cmd 0.36 qw( can_run run );
+use IPC::Cmd 0.36 qw( can_run );
 use File::Temp qw( tempfile );
 use File::Copy;
 use File::Basename qw(dirname);
-use Scalar::Util qw(looks_like_number);
 
 use PS::IPP::Metadata::Config;
@@ -22,5 +21,5 @@
 use PS::IPP::Metadata::List qw( parse_md_list );
 
-use PS::IPP::Config qw( :standard );
+use PS::IPP::Config qw( :standard ps_run );
 use PS::IPP::PStamp::RequestFile qw( :standard );
 use PS::IPP::PStamp::Job qw( :standard );
@@ -138,8 +137,8 @@
             $command   .= " -dbname $dbname" if $dbname;
             $command   .= " -dbserver $dbserver" if $dbserver;
-            my ( $success, $error_msg, $full_buf, $stdout_buf, $stderr_buf ) = run(command => $command, verbose => $verbose);
-	    my $error_code = &parse_error_message ($success, $error_msg, $command);
+            my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = ps_run($command, $verbose);
             unless ($success) {
-                die("Unable to perform $command error code: $error_code");
+		my $rc = $error_code >> 8;
+                die("Unable to perform $command error code: $rc ($error_code)");
             }
             my $output = join "", @$stdout_buf;
@@ -261,16 +260,15 @@
         {
             my $command = "$pstamp_results --input $table_def_name --output $outdir/results.fits";
-            my ( $success, $error_msg, $full_buf, $stdout_buf, $stderr_buf ) = run(command => $command, verbose => $verbose);
-	    my $error_code = &parse_error_message ($success, $error_msg, $command);
+            my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = ps_run(command => $command, verbose => $verbose);
             unless ($success) {
                 print STDERR "Unable to perform $command error code: $error_code\n";
-                $request_fault = $error_code;
+                $request_fault = $error_code >> 8;
             } else {
                 # dump a textual representation
                 my $command = "$pstampdump $outdir/results.fits > $outdir/results.mdc";
                 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-                    run(command => $command, verbose => $verbose);
+                    ps_run(command => $command, verbose => $verbose);
                 unless ($success) {
-                    $request_fault = $error_code;
+		    $request_fault = $error_code >> 8;
                     my_die("Unable to perform $command error code: $error_code", $req_id, $request_fault);
                 }
@@ -287,7 +285,7 @@
 
         my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-            run(command => $command, verbose => $verbose);
+            ps_run(command => $command, verbose => $verbose);
         unless ($success) {
-            $request_fault = $error_code;
+	    $request_fault = $error_code >> 8;
             my_die("Unable to perform $command error code: $error_code\n", $req_id, $request_fault);
         }
@@ -299,5 +297,5 @@
         $command   .= " -dbserver $dbserver" if $dbserver;
         my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-            run(command => $command, verbose => $verbose);
+            ps_run(command => $command, verbose => $verbose);
         unless ($success) {
             die("Unable to perform $command error code: $error_code");
@@ -319,5 +317,5 @@
 
     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-        run(command => $command, verbose => $verbose);
+        ps_run(command => $command, verbose => $verbose);
     unless ($success) {
         die("Unable to perform $command error code: $error_code");
@@ -435,5 +433,5 @@
             # run the tool and parse the output
             my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-                        run(command => $command, verbose => $verbose);
+                        ps_run(command => $command, verbose => $verbose);
             unless ($success) {
                 # not sure if we should die here
@@ -506,29 +504,2 @@
     return 40587.0 + ($ticks/86400.);
 }
-
-# if the program exited normally, the exit value is returned
-# if the program exited with a signal (abort, crash, etc), PS_EXIT_PROG_ERROR (4) is returned
-# if the program failed to run, -PS_EXIT_PROG_ERROR (-4) is returned
-sub parse_error_message {
-    my $success = shift;
-    my $error_msg = shift;
-    my $command = shift;
-
-    if ($success) { return 0; }
-
-    print "raw error_msg: $error_msg\n";
-    print "full command: $command\n";
-
-    if (&looks_like_number($error_msg)) { return (($error_msg >> 8) or ($PS_EXIT_PROG_ERROR)); }
-	
-    # which of these match?
-    my ($error_code) = $error_msg =~ m/exited with value (\d+)/;
-    if (defined $error_code) { return $error_code; }
-    
-    ($error_code) = $error_msg =~ m/died with signal (\d+)/;
-#   if (defined $error_code) { return (128 + $error_code); }
-    if (defined $error_code) { return ($PS_EXIT_PROG_ERROR); }
-    
-    # probably failed to execute:
-    return (-1*$PS_EXIT_PROG_ERROR);
-}
Index: /branches/eam_branches/ipp-pstamp-20260421/pstamp/scripts/pstamp_get_image_job.pl
===================================================================
--- /branches/eam_branches/ipp-pstamp-20260421/pstamp/scripts/pstamp_get_image_job.pl	(revision 43051)
+++ /branches/eam_branches/ipp-pstamp-20260421/pstamp/scripts/pstamp_get_image_job.pl	(revision 43052)
@@ -16,8 +16,8 @@
 use File::Basename;
 use Digest::MD5::File qw( file_md5_hex );
-use IPC::Cmd 0.36 qw( can_run run );
-
-
-use PS::IPP::Config qw( :standard );
+use IPC::Cmd 0.36 qw( can_run );
+
+
+use PS::IPP::Config qw( :standard ps_run );
 
 my $product;
@@ -132,5 +132,5 @@
     $command .= " --verbose" if $verbose;
     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-        run(command => $command, verbose => $verbose);
+        ps_run(command => $command, verbose => $verbose);
     unless ($success) {
         my_die("Unable to perform $command: $error_code", $error_code >> 8);
@@ -174,5 +174,5 @@
         my $command = "$pstamptool -deletefile -job_id $job_id";
         my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-            run(command => $command, verbose => $verbose);
+            ps_run(command => $command, verbose => $verbose);
         unless ($success) {
             my_die("Unable to perform $command: $error_code", $error_code >> 8);
@@ -193,5 +193,5 @@
     my $command = "$pstamptool -addfile -job_id $job_id -path $bundle_name";
     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-        run(command => $command, verbose => $verbose);
+        ps_run(command => $command, verbose => $verbose);
     unless ($success) {
         my_die("Unable to perform $command: $error_code", $error_code >> 8);
Index: /branches/eam_branches/ipp-pstamp-20260421/pstamp/scripts/pstamp_insert_request.pl
===================================================================
--- /branches/eam_branches/ipp-pstamp-20260421/pstamp/scripts/pstamp_insert_request.pl	(revision 43051)
+++ /branches/eam_branches/ipp-pstamp-20260421/pstamp/scripts/pstamp_insert_request.pl	(revision 43052)
@@ -33,7 +33,7 @@
     if( !defined($tmp_req_file) or !defined($workdir) or !defined ($dbname)
         or !defined($dbserver));
-use IPC::Cmd 0.36 qw( can_run run );
+use IPC::Cmd 0.36 qw( can_run );
 
-use PS::IPP::Config qw( :standard );
+use PS::IPP::Config qw( :standard ps_run );
 
 use Cwd;
@@ -60,5 +60,5 @@
     my $command = "$fhead -x 0 $tmp_req_file";
     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-        run(command => $command, verbose => $verbose);
+        ps_run(command => $command, verbose => $verbose);
     unless ($success) {
         print STDERR @$stderr_buf;
@@ -147,5 +147,5 @@
     $command .= " -label WEB.UP";
     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-        run(command => $command, verbose => $verbose);
+        ps_run(command => $command, verbose => $verbose);
     unless ($success) {
         my $errbuf = join "", @$stderr_buf;
@@ -172,5 +172,5 @@
     $command .= " -dbserver $dbserver" if $dbserver;
     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-        run(command => $command, verbose => $verbose);
+        ps_run(command => $command, verbose => $verbose);
     unless ($success) {
 	my $status = $error_code >> 8;
Index: /branches/eam_branches/ipp-pstamp-20260421/pstamp/scripts/pstamp_job_run.pl
===================================================================
--- /branches/eam_branches/ipp-pstamp-20260421/pstamp/scripts/pstamp_job_run.pl	(revision 43051)
+++ /branches/eam_branches/ipp-pstamp-20260421/pstamp/scripts/pstamp_job_run.pl	(revision 43052)
@@ -15,10 +15,9 @@
 use File::Copy;
 use File::Temp qw(tempfile tempdir);
-use Scalar::Util qw(looks_like_number);
 
 use Digest::MD5::File qw( file_md5_hex );
 use PS::IPP::PStamp::RequestFile qw( :standard );
 use PS::IPP::PStamp::Job qw( :standard );
-use IPC::Cmd 0.36 qw( can_run run );
+use IPC::Cmd 0.36 qw( can_run );
 use POSIX;
 
@@ -27,5 +26,5 @@
 use PS::IPP::Metadata::List qw( parse_md_list );
 
-use PS::IPP::Config qw( :standard );
+use PS::IPP::Config qw( :standard ps_run );
 
 my ($job_id, $redirect_output, $outputBase, $rownum, $jobType, $options); 
@@ -222,5 +221,5 @@
         my $command = "$psgetcalibinfo --cam_id $cam_id --output $calibfile --dbname $params->{imagedb}";
         my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-            run(command => $command, verbose => $verbose);
+            ps_run(command => $command, verbose => $verbose);
 
         my $exitStatus;
@@ -254,5 +253,5 @@
 
         my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-            run(command => $command, verbose => $verbose);
+            ps_run(command => $command, verbose => $verbose);
 
         if (WIFEXITED($error_code)) {
@@ -289,5 +288,5 @@
 
             my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-                run(command => $command, verbose => $verbose);
+                ps_run(command => $command, verbose => $verbose);
 
             if (WIFEXITED($error_code)) {
@@ -311,5 +310,5 @@
                     my $command = "$fpack_gzip $tmpName > $numName";
                     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-                        run(command => $command, verbose => $verbose);
+                        ps_run(command => $command, verbose => $verbose);
 
                     if (WIFEXITED($error_code)) {
@@ -330,5 +329,5 @@
                 my $command = "$fpack_gzip $tmpBase.fits > $outputBase.exp.fits";
                 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-                    run(command => $command, verbose => $verbose);
+                    ps_run(command => $command, verbose => $verbose);
 
                 if (WIFEXITED($error_code)) {
@@ -412,5 +411,5 @@
     $command .= " --verbose" if $verbose;
     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-        run(command => $command, verbose => $verbose);
+        ps_run(command => $command, verbose => $verbose);
 
     if ($success) {
@@ -437,5 +436,5 @@
     $command .= " --save-temps" if $save_temps;
     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-	run(command => $command, verbose => $verbose);
+	ps_run(command => $command, verbose => $verbose);
 
     # Although dqueryparse can potentially force more updates (and more jobs), it should still return success.
@@ -461,5 +460,5 @@
     if (!$no_update) {
         my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-            run(command => $command, verbose => $verbose);
+            ps_run(command => $command, verbose => $verbose);
         unless ($success) {
             die("Unable to perform $command: $error_code");
@@ -652,5 +651,5 @@
 
     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-        run(command => $command, verbose => $verbose);
+        ps_run(command => $command, verbose => $verbose);
     unless ($success) {
         $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
@@ -826,5 +825,5 @@
             my $command = "$stack_bkg_mk_mdc --stack_id $stack_id --camera $camera --dbname $imagedb > $mdcfile";
             my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-                run(command => $command, verbose => $verbose);
+                ps_run(command => $command, verbose => $verbose);
             unless ($success) {
                 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
@@ -842,5 +841,5 @@
             $command .= " -mask $input_mask" if $input_mask;
             my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-                run(command => $command, verbose => $very_verbose);
+                ps_run(command => $command, verbose => $very_verbose);
             unless ($success) {
                 # we turned off verbosity because ppBackgroundStack emits too much output
@@ -867,5 +866,5 @@
 
             my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-                run(command => $command, verbose => $verbose);
+                ps_run(command => $command, verbose => $verbose);
             unless ($success) {
                 print STDERR join "", @$stderr_buf;
@@ -947,30 +946,2 @@
     exit $exit_code;
 }
-
-
-# if the program exited normally, the exit value is returned
-# if the program exited with a signal (abort, crash, etc), PS_EXIT_PROG_ERROR (4) is returned
-# if the program failed to run, -PS_EXIT_PROG_ERROR (-4) is returned
-sub parse_error_message {
-    my $success = shift;
-    my $error_msg = shift;
-    my $command = shift;
-
-    if ($success) { return 0; }
-
-    print "raw error_msg: $error_msg\n";
-    print "full command: $command\n";
-
-    if (&looks_like_number($error_msg)) { return (($error_msg >> 8) or ($PS_EXIT_PROG_ERROR)); }
-	
-    # which of these match?
-    my ($error_code) = $error_msg =~ m/exited with value (\d+)/;
-    if (defined $error_code) { return $error_code; }
-    
-    ($error_code) = $error_msg =~ m/died with signal (\d+)/;
-#   if (defined $error_code) { return (128 + $error_code); }
-    if (defined $error_code) { return ($PS_EXIT_PROG_ERROR); }
-    
-    # probably failed to execute:
-    return (-1*$PS_EXIT_PROG_ERROR);
-}
Index: /branches/eam_branches/ipp-pstamp-20260421/pstamp/scripts/pstamp_listjobs.pl
===================================================================
--- /branches/eam_branches/ipp-pstamp-20260421/pstamp/scripts/pstamp_listjobs.pl	(revision 43051)
+++ /branches/eam_branches/ipp-pstamp-20260421/pstamp/scripts/pstamp_listjobs.pl	(revision 43052)
@@ -36,5 +36,5 @@
 }
 
-use IPC::Cmd 0.36 qw( can_run run );
+use IPC::Cmd 0.36 qw( can_run );
 
 use PS::IPP::Metadata::Config;
@@ -52,4 +52,5 @@
 		       metadataLookupBool
 		       caturi
+		       ps_run
 		       );
 
@@ -72,5 +73,5 @@
     $command .= " -dbserver $dbserver" if $dbserver;
     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-        run(command => $command, verbose => $verbose);
+        ps_run(command => $command, verbose => $verbose);
     unless ($success) {
         die("Unable to perform pstamptool -pendingreq: $error_code");
Index: /branches/eam_branches/ipp-pstamp-20260421/pstamp/scripts/pstamp_parser_run.pl
===================================================================
--- /branches/eam_branches/ipp-pstamp-20260421/pstamp/scripts/pstamp_parser_run.pl	(revision 43051)
+++ /branches/eam_branches/ipp-pstamp-20260421/pstamp/scripts/pstamp_parser_run.pl	(revision 43052)
@@ -13,9 +13,8 @@
 use Getopt::Long qw( GetOptions );
 use File::Basename qw( basename dirname);
-use Scalar::Util qw(looks_like_number);
 use File::Copy;
 use POSIX qw( strftime );
 use Carp;
-use IPC::Cmd 0.36 qw( can_run run );
+use IPC::Cmd 0.36 qw( can_run );
 
 use PS::IPP::Metadata::Config;
@@ -23,5 +22,5 @@
 use PS::IPP::Metadata::List qw( parse_md_list );
 
-use PS::IPP::Config qw( :standard );
+use PS::IPP::Config qw( :standard ps_run );
 use PS::IPP::PStamp::RequestFile qw( :standard );
 
@@ -129,9 +128,8 @@
     # if the uri is an http uri download the file 
     my $command = "$dsget --uri $uri --filename $new_uri --timeout 120";
-    my ( $success, $error_msg, $full_buf, $stdout_buf, $stderr_buf ) =
-        run(command => $command, verbose => $verbose);
-    my $error_code = &parse_error_message ($success, $error_msg, $command);
+    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
+        ps_run(command => $command, verbose => $verbose);
     unless ($success) {
-        my_die("Unable to perform $command error code: $error_code", $req_id, $error_code);
+        my_die("Unable to perform $command error code: $error_code", $req_id, $error_code >> 8);
     }
 } elsif ($uri ne $new_uri) {
@@ -206,7 +204,6 @@
     $command   .= " -dbname $dbname" if $dbname;
     $command   .= " -dbserver $dbserver" if $dbserver;
-    my ( $success, $error_msg, $full_buf, $stdout_buf, $stderr_buf ) =
+    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
         run(command => $command, verbose => $verbose);
-    my $error_code = &parse_error_message ($success, $error_msg, $command);
     unless ($success) {
         die("Unable to perform $command error code: $error_code");
@@ -230,7 +227,6 @@
 
     my $command = "$parse_cmd";
-    my ( $success, $error_msg, $full_buf, $stdout_buf, $stderr_buf ) =
-        run(command => $command, verbose => $verbose);
-    my $error_code = &parse_error_message ($success, $error_msg, $command);
+    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
+        ps_run(command => $command, verbose => $verbose);
 
     # save the contents of stderr (if any) to a file. This is relevant if
@@ -258,5 +254,5 @@
         }
     } else {
-        $fault = $error_code;
+        $fault = $error_code >> 8;
     }
 }
@@ -275,5 +271,5 @@
     $command   .= " -dbserver $dbserver" if $dbserver;
     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-        run(command => $command, verbose => $verbose);
+        ps_run(command => $command, verbose => $verbose);
     unless ($success) {
         die("Unable to perform $command error code: $error_code");
@@ -324,5 +320,5 @@
     $command   .= " -dbserver $dbserver" if $dbserver;
     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-        run(command => $command, verbose => $verbose);
+        ps_run(command => $command, verbose => $verbose);
     unless ($success) {
         die("Unable to perform $command error code: $error_code");
@@ -330,30 +326,2 @@
     exit $fault;
 }
-
-# if the program exited normally, the exit value is returned
-# if the program exited with a signal (abort, crash, etc), PS_EXIT_PROG_ERROR (4) is returned
-# if the program failed to run, -PS_EXIT_PROG_ERROR (-4) is returned
-sub parse_error_message {
-    my $success = shift;
-    my $error_msg = shift;
-    my $command = shift;
-
-    if ($success) { return 0; }
-
-    print "raw error_msg: $error_msg\n";
-    print "full command: $command\n";
-
-    if (&looks_like_number($error_msg)) { return (($error_msg >> 8) or ($PS_EXIT_PROG_ERROR)); }
-	
-    # which of these match?
-    my ($error_code) = $error_msg =~ m/exited with value (\d+)/;
-    if (defined $error_code) { return $error_code; }
-    
-    ($error_code) = $error_msg =~ m/died with signal (\d+)/;
-#   if (defined $error_code) { return (128 + $error_code); }
-    if (defined $error_code) { return ($PS_EXIT_PROG_ERROR); }
-    
-    # probably failed to execute:
-    return (-1*$PS_EXIT_PROG_ERROR);
-}
-
Index: /branches/eam_branches/ipp-pstamp-20260421/pstamp/scripts/pstamp_queue_cleanup.pl
===================================================================
--- /branches/eam_branches/ipp-pstamp-20260421/pstamp/scripts/pstamp_queue_cleanup.pl	(revision 43051)
+++ /branches/eam_branches/ipp-pstamp-20260421/pstamp/scripts/pstamp_queue_cleanup.pl	(revision 43052)
@@ -6,9 +6,8 @@
 use warnings;
 
-use PS::IPP::Config 1.01 qw( :standard );
-use IPC::Cmd 0.36 qw( can_run run );
+use PS::IPP::Config 1.01 qw( :standard ps_run );
+use IPC::Cmd 0.36 qw( can_run );
 use Getopt::Long qw( GetOptions :config auto_help auto_version gnu_getopt );
 use Pod::Usage qw( pod2usage );
-use Scalar::Util qw(looks_like_number);
 
 my $verbose;
@@ -70,9 +69,8 @@
 
 my $command = "$pstamptool -updatereq -set_state goto_cleaned -state stop -timestamp_end $timestamp_end";
-my  ( $success, $error_msg, $full_buf, $stdout_buf, $stderr_buf ) =
-    run(command => $command, verbose => $verbose);
-my $error_code = &parse_error_message ($success, $error_msg, $command);
+my  ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
+    ps_run(command => $command, verbose => $verbose);
 unless ($success) {
-    $error_code = ($error_code or 1);
+    $error_code = (($error_code >> 8) or 1);
     warn("$command failed. exit status: $error_code");
     exit $error_code;
@@ -82,28 +80,2 @@
 exit 0;
 
-# if the program exited normally, the exit value is returned
-# if the program exited with a signal (abort, crash, etc), PS_EXIT_PROG_ERROR (4) is returned
-# if the program failed to run, -PS_EXIT_PROG_ERROR (-4) is returned
-sub parse_error_message {
-    my $success = shift;
-    my $error_msg = shift;
-    my $command = shift;
-
-    if ($success) { return 0; }
-
-    print "raw error_msg: $error_msg\n";
-    print "full command: $command\n";
-
-    if (&looks_like_number($error_msg)) { return (($error_msg >> 8) or ($PS_EXIT_PROG_ERROR)); }
-	
-    # which of these match?
-    my ($error_code) = $error_msg =~ m/exited with value (\d+)/;
-    if (defined $error_code) { return $error_code; }
-    
-    ($error_code) = $error_msg =~ m/died with signal (\d+)/;
-#   if (defined $error_code) { return (128 + $error_code); }
-    if (defined $error_code) { return ($PS_EXIT_PROG_ERROR); }
-    
-    # probably failed to execute:
-    return (-1*$PS_EXIT_PROG_ERROR);
-}
Index: /branches/eam_branches/ipp-pstamp-20260421/pstamp/scripts/pstamp_queue_requests.pl
===================================================================
--- /branches/eam_branches/ipp-pstamp-20260421/pstamp/scripts/pstamp_queue_requests.pl	(revision 43051)
+++ /branches/eam_branches/ipp-pstamp-20260421/pstamp/scripts/pstamp_queue_requests.pl	(revision 43052)
@@ -11,5 +11,4 @@
 
 use Getopt::Long qw( GetOptions );
-use Scalar::Util qw(looks_like_number);
 
 use Sys::Hostname;
@@ -35,5 +34,5 @@
 }
 
-use IPC::Cmd 0.36 qw( can_run run );
+use IPC::Cmd 0.36 qw( can_run );
 
 use PS::IPP::Metadata::Config;
@@ -51,4 +50,5 @@
 		       metadataLookupBool
 		       caturi
+		       ps_run
 		       );
 
@@ -78,9 +78,8 @@
     $command .= " -dbserver $dbserver" if $dbserver;
 
-    my ( $success, $error_msg, $full_buf, $stdout_buf, $stderr_buf ) =
-        run(command => $command, verbose => $verbose);
-    my $error_code = &parse_error_message ($success, $error_msg, $command);
+    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
+        ps_run(command => $command, verbose => $verbose);
     unless ($success) {
-        my $rc = $error_code;
+        my $rc = ($error_code >> 8);
         die("Unable to perform pstamptool -datastore: $rc");
     }
@@ -123,10 +122,9 @@
         $command .= " --timeout $timeout";
 
-        my ( $success, $error_msg, $full_buf, $stdout_buf, $stderr_buf ) =
-            run(command => $command, verbose => $verbose);
-	my $error_code = &parse_error_message ($success, $error_msg, $command);
+        my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
+            ps_run(command => $command, verbose => $verbose);
         unless ($success) {
             # dsproductls exit status is the http error code - 300
-            my $exit_status = $error_code;
+            my $exit_status = ($error_code >> 8);
 
             # don't die on "common faults"
@@ -170,7 +168,6 @@
         {
             my $command = "$dsfilesetls --uri $uri";
-            my ( $success, $error_msg, $full_buf, $stdout_buf, $stderr_buf ) =
-                    run(command => $command, verbose => $verbose);
-	    my $error_code = &parse_error_message ($success, $error_msg, $command);
+            my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
+                    ps_run(command => $command, verbose => $verbose);
             unless ($success) {
                 # we don't want to die here. We need to set lastFileset
@@ -201,7 +198,6 @@
                 $command .= " -dbserver $dbserver" if $dbserver;
 
-                my ( $success, $error_msg, $full_buf, $stdout_buf, $stderr_buf ) =
-                        run(command => $command, verbose => $verbose);
-		my $error_code = &parse_error_message ($success, $error_msg, $command);
+                my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
+                        ps_run(command => $command, verbose => $verbose);
 
                 unless ($success) {
@@ -217,7 +213,6 @@
 	    $command .= " -dbname $dbname" if $dbname;
 	    $command .= " -dbserver $dbserver" if $dbserver;
-	    my ( $success, $error_msg, $full_buf, $stdout_buf, $stderr_buf ) =
-		run(command => $command, verbose => $verbose);
-	    my $error_code = &parse_error_message ($success, $error_msg, $command);
+	    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
+		ps_run(command => $command, verbose => $verbose);
 	    unless ($success) {
 		die("Unable to perform pstamptool -moddatastore: $error_code");
@@ -238,36 +233,8 @@
                 $command .= " -dbname $dbname" if $dbname;
                 $command .= " -dbserver $dbserver" if $dbserver;
-    my ( $success, $error_msg, $full_buf, $stdout_buf, $stderr_buf ) =
+    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
         run(command => $command, verbose => $verbose);
-    my $error_code = &parse_error_message ($success, $error_msg, $command);
     unless ($success) {
         die("Unable to perform pstamptool -moddatastore: $error_code");
     }
 }
-
-# if the program exited normally, the exit value is returned
-# if the program exited with a signal (abort, crash, etc), PS_EXIT_PROG_ERROR (4) is returned
-# if the program failed to run, -PS_EXIT_PROG_ERROR (-4) is returned
-sub parse_error_message {
-    my $success = shift;
-    my $error_msg = shift;
-    my $command = shift;
-
-    if ($success) { return 0; }
-
-    print "raw error_msg: $error_msg\n";
-    print "full command: $command\n";
-
-    if (&looks_like_number($error_msg)) { return (($error_msg >> 8) or ($PS_EXIT_PROG_ERROR)); }
-	
-    # which of these match?
-    my ($error_code) = $error_msg =~ m/exited with value (\d+)/;
-    if (defined $error_code) { return $error_code; }
-    
-    ($error_code) = $error_msg =~ m/died with signal (\d+)/;
-#   if (defined $error_code) { return (128 + $error_code); }
-    if (defined $error_code) { return ($PS_EXIT_PROG_ERROR); }
-    
-    # probably failed to execute:
-    return (-1*$PS_EXIT_PROG_ERROR);
-}
Index: /branches/eam_branches/ipp-pstamp-20260421/pstamp/scripts/pstamp_queue_update_cleanup.pl
===================================================================
--- /branches/eam_branches/ipp-pstamp-20260421/pstamp/scripts/pstamp_queue_update_cleanup.pl	(revision 43051)
+++ /branches/eam_branches/ipp-pstamp-20260421/pstamp/scripts/pstamp_queue_update_cleanup.pl	(revision 43052)
@@ -6,9 +6,8 @@
 use warnings;
 
-use PS::IPP::Config 1.01 qw( :standard );
-use IPC::Cmd 0.36 qw( can_run run );
+use PS::IPP::Config 1.01 qw( :standard ps_run );
+use IPC::Cmd 0.36 qw( can_run );
 use Getopt::Long qw( GetOptions :config auto_help auto_version gnu_getopt );
 use Pod::Usage qw( pod2usage );
-use Scalar::Util qw(looks_like_number);
 
 my $verbose;
@@ -67,9 +66,8 @@
 
 my $command = "$pstamptool -pendingdependent -includefaulted -simple";
-my  ( $success, $error_msg, $full_buf, $stdout_buf, $stderr_buf ) =
-    run(command => $command, verbose => $very_verbose);
-my $error_code = &parse_error_message ($success, $error_msg, $command);
+my  ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
+    ps_run(command => $command, verbose => $very_verbose);
 unless ($success) {
-    $error_code = ($error_code or 1);
+    $error_code = (($error_code >> 8) or 1);
     warn("$command failed. exit status: $error_code");
     exit $error_code;
@@ -88,9 +86,8 @@
         $command .= " -dbname $imagedb";
 
-        my  ( $success, $error_msg, $full_buf, $stdout_buf, $stderr_buf ) =
-            run(command => $command, verbose => $very_verbose);
-	my $error_code = &parse_error_message ($success, $error_msg, $command);
+        my  ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
+            ps_run(command => $command, verbose => $very_verbose);
         unless ($success) {
-            $error_code = ($error_code or 1);
+            $error_code = (($error_code >> 8) or 1);
             warn("$command failed. exit status: $error_code");
             exit $error_code;
@@ -101,28 +98,2 @@
 exit 0;
 
-# if the program exited normally, the exit value is returned
-# if the program exited with a signal (abort, crash, etc), PS_EXIT_PROG_ERROR (4) is returned
-# if the program failed to run, -PS_EXIT_PROG_ERROR (-4) is returned
-sub parse_error_message {
-    my $success = shift;
-    my $error_msg = shift;
-    my $command = shift;
-
-    if ($success) { return 0; }
-
-    print "raw error_msg: $error_msg\n";
-    print "full command: $command\n";
-
-    if (&looks_like_number($error_msg)) { return (($error_msg >> 8) or ($PS_EXIT_PROG_ERROR)); }
-	
-    # which of these match?
-    my ($error_code) = $error_msg =~ m/exited with value (\d+)/;
-    if (defined $error_code) { return $error_code; }
-    
-    ($error_code) = $error_msg =~ m/died with signal (\d+)/;
-#   if (defined $error_code) { return (128 + $error_code); }
-    if (defined $error_code) { return ($PS_EXIT_PROG_ERROR); }
-    
-    # probably failed to execute:
-    return (-1*$PS_EXIT_PROG_ERROR);
-}
Index: /branches/eam_branches/ipp-pstamp-20260421/pstamp/scripts/pstamp_revert_request.pl
===================================================================
--- /branches/eam_branches/ipp-pstamp-20260421/pstamp/scripts/pstamp_revert_request.pl	(revision 43051)
+++ /branches/eam_branches/ipp-pstamp-20260421/pstamp/scripts/pstamp_revert_request.pl	(revision 43052)
@@ -10,5 +10,5 @@
 
 use Sys::Hostname;
-use IPC::Cmd 0.36 qw( can_run run );
+use IPC::Cmd 0.36 qw( can_run );
 use File::Temp qw( tempfile );
 use File::Copy;
@@ -28,4 +28,5 @@
 		       metadataLookupBool
 		       caturi
+		       ps_run
 		       );
 
@@ -68,5 +69,5 @@
     $command   .= " -dbserver $dbserver" if $dbserver;
     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-        run(command => $command, verbose => $verbose);
+        ps_run(command => $command, verbose => $verbose);
     unless ($success) {
         die("Unable to perform $command error code: $error_code");
@@ -102,5 +103,5 @@
 #    $command .= " --dbname $dbname" if $dbname;
     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-        run(command => $command, verbose => $verbose);
+        ps_run(command => $command, verbose => $verbose);
     unless ($success) {
         die "Unable to perform $command error code: $error_code";
@@ -114,5 +115,5 @@
     $command   .= " -dbserver $dbserver" if $dbserver;
     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-        run(command => $command, verbose => $verbose);
+        ps_run(command => $command, verbose => $verbose);
     unless ($success) {
         die("Unable to perform $command error code: $error_code");
Index: /branches/eam_branches/ipp-pstamp-20260421/pstamp/scripts/pstamp_save_server_status.pl
===================================================================
--- /branches/eam_branches/ipp-pstamp-20260421/pstamp/scripts/pstamp_save_server_status.pl	(revision 43051)
+++ /branches/eam_branches/ipp-pstamp-20260421/pstamp/scripts/pstamp_save_server_status.pl	(revision 43052)
@@ -7,9 +7,8 @@
 use warnings;
 
-use PS::IPP::Config 1.01 qw( :standard );
-use IPC::Cmd 0.36 qw( can_run run );
+use PS::IPP::Config 1.01 qw( :standard ps_run );
+use IPC::Cmd 0.36 qw( can_run );
 use Getopt::Long qw( GetOptions :config auto_help auto_version gnu_getopt );
 use Pod::Usage qw( pod2usage );
-use Scalar::Util qw(looks_like_number);
 
 my $updatelink;
@@ -64,9 +63,8 @@
 my $command = "pstamp_server_status --workdir $pstamp_workdir > $file";
 #my $command = "pstamp_server_status > $file";
-my  ( $success, $error_msgo, $full_buf, $stdout_buf, $stderr_buf ) =
-    run(command => $command, verbose => $verbose);
-my $error_code = &parse_error_message ($success, $error_msg, $command);
+my  ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
+    ps_run(command => $command, verbose => $verbose);
 unless ($success) {
-    $error_code = ($error_code or 1);
+    $error_code = (($error_code >> 8) or 1);
     warn("$command failed. exit status: $error_code");
     exit $error_code;
@@ -82,29 +80,2 @@
 
 exit 0;
-
-# if the program exited normally, the exit value is returned
-# if the program exited with a signal (abort, crash, etc), PS_EXIT_PROG_ERROR (4) is returned
-# if the program failed to run, -PS_EXIT_PROG_ERROR (-4) is returned
-sub parse_error_message {
-    my $success = shift;
-    my $error_msg = shift;
-    my $command = shift;
-
-    if ($success) { return 0; }
-
-    print "raw error_msg: $error_msg\n";
-    print "full command: $command\n";
-
-    if (&looks_like_number($error_msg)) { return (($error_msg >> 8) or ($PS_EXIT_PROG_ERROR)); }
-	
-    # which of these match?
-    my ($error_code) = $error_msg =~ m/exited with value (\d+)/;
-    if (defined $error_code) { return $error_code; }
-    
-    ($error_code) = $error_msg =~ m/died with signal (\d+)/;
-#   if (defined $error_code) { return (128 + $error_code); }
-    if (defined $error_code) { return ($PS_EXIT_PROG_ERROR); }
-    
-    # probably failed to execute:
-    return (-1*$PS_EXIT_PROG_ERROR);
-}
Index: /branches/eam_branches/ipp-pstamp-20260421/pstamp/scripts/pstamp_server_status
===================================================================
--- /branches/eam_branches/ipp-pstamp-20260421/pstamp/scripts/pstamp_server_status	(revision 43051)
+++ /branches/eam_branches/ipp-pstamp-20260421/pstamp/scripts/pstamp_server_status	(revision 43052)
@@ -7,11 +7,10 @@
 
 #use DBI;
-use IPC::Cmd 0.36 qw( can_run run );
+use IPC::Cmd 0.36 qw( can_run );
 #use PS::IPP::Metadata::Config;
-use PS::IPP::Config 1.01 qw( :standard );
+use PS::IPP::Config 1.01 qw( :standard ps_run );
 
 use Getopt::Long qw( GetOptions :config auto_help auto_version gnu_getopt );
 use Pod::Usage qw( pod2usage );
-use Scalar::Util qw(looks_like_number);
 
 my ($rundir, $workdir, $verbose, $save_temps);
@@ -71,11 +70,10 @@
     my $serverRunning = 0;
     my $command = "$pantasks_client < $pantasks_script";
-    my  ( $success, $error_msg, $full_buf, $stdout_buf, $stderr_buf ) =
-        run(command => $command, verbose => $verbose);
-    my $error_code = &parse_error_message ($success, $error_msg, $command);
+    my  ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
+        ps_run(command => $command, verbose => $verbose);
     if ($success) {
         $serverRunning = 1;
     } else {
-        $error_code = ($error_code or 1);
+        $error_code = (($error_code >> 8) or 1);
         if ($error_code == 12 || $error_code == 13) {
             print "Postage Stamp Server is not running\n<br>";
@@ -206,29 +204,2 @@
 
 exit 0;
-
-# if the program exited normally, the exit value is returned
-# if the program exited with a signal (abort, crash, etc), PS_EXIT_PROG_ERROR (4) is returned
-# if the program failed to run, -PS_EXIT_PROG_ERROR (-4) is returned
-sub parse_error_message {
-    my $success = shift;
-    my $error_msg = shift;
-    my $command = shift;
-
-    if ($success) { return 0; }
-
-    print "raw error_msg: $error_msg\n";
-    print "full command: $command\n";
-
-    if (&looks_like_number($error_msg)) { return (($error_msg >> 8) or ($PS_EXIT_PROG_ERROR)); }
-	
-    # which of these match?
-    my ($error_code) = $error_msg =~ m/exited with value (\d+)/;
-    if (defined $error_code) { return $error_code; }
-    
-    ($error_code) = $error_msg =~ m/died with signal (\d+)/;
-#   if (defined $error_code) { return (128 + $error_code); }
-    if (defined $error_code) { return ($PS_EXIT_PROG_ERROR); }
-    
-    # probably failed to execute:
-    return (-1*$PS_EXIT_PROG_ERROR);
-}
Index: /branches/eam_branches/ipp-pstamp-20260421/pstamp/scripts/pstamp_webrequest.pl
===================================================================
--- /branches/eam_branches/ipp-pstamp-20260421/pstamp/scripts/pstamp_webrequest.pl	(revision 43051)
+++ /branches/eam_branches/ipp-pstamp-20260421/pstamp/scripts/pstamp_webrequest.pl	(revision 43052)
@@ -46,5 +46,5 @@
 
 
-use IPC::Cmd 0.36 qw( can_run run );
+use IPC::Cmd 0.36 qw( can_run );
 
 use PS::IPP::Config qw($PS_EXIT_SUCCESS
@@ -58,4 +58,5 @@
 		       metadataLookupBool
 		       caturi
+		       ps_run
 		       );
 
@@ -102,5 +103,5 @@
 
     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-        run(command => $command, verbose => $verbose);
+        ps_run(command => $command, verbose => $verbose);
     unless ($success) {
         print STDERR @$stderr_buf;
@@ -120,5 +121,5 @@
     $command .= " -dbserver $dbserver" if $dbserver;
     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-        run(command => $command, verbose => $verbose);
+        ps_run(command => $command, verbose => $verbose);
     unless ($success) {
         print STDERR @$stderr_buf;
@@ -140,5 +141,5 @@
     $command .= " -dbserver $dbserver" if $dbserver;
     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-        run(command => $command, verbose => $verbose);
+        ps_run(command => $command, verbose => $verbose);
     unless ($success) {
         print STDERR @$stderr_buf;
Index: /branches/eam_branches/ipp-pstamp-20260421/pstamp/scripts/pstampparse.pl
===================================================================
--- /branches/eam_branches/ipp-pstamp-20260421/pstamp/scripts/pstampparse.pl	(revision 43051)
+++ /branches/eam_branches/ipp-pstamp-20260421/pstamp/scripts/pstampparse.pl	(revision 43052)
@@ -15,5 +15,4 @@
 use File::Temp qw(tempfile);
 use File::Basename qw(basename);
-use Scalar::Util qw(looks_like_number);
 use Carp;
 use POSIX;
@@ -67,5 +66,5 @@
 }
 
-use IPC::Cmd 0.36 qw( can_run run );
+use IPC::Cmd 0.36 qw( can_run );
 
 use PS::IPP::Metadata::Config;
@@ -73,5 +72,5 @@
 use PS::IPP::Metadata::List qw( parse_md_list );
 
-use PS::IPP::Config qw( :standard );
+use PS::IPP::Config qw( :standard ps_run );
 my $ipprc = PS::IPP::Config->new(); # IPP Configuration
 
@@ -127,9 +126,9 @@
 {
     my $command = "echo $request_file_name | $fields -x 0 EXTNAME EXTVER REQ_NAME ACTION EMAIL";
-    my ( $success, $error_msg, $full_buf, $stdout_buf, $stderr_buf ) =
-        run(command => $command, verbose => $verbose);
-    my $error_code = &parse_error_message ($success, $error_msg, $command);
+    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
+        ps_run(command => $command, verbose => $verbose);
 
     # note fields doesn't return zero when it succeeds.
+    # XXX EAM 2026.06.10 : the above note has not been true since 2007!
     $fields_output = join "", @$stdout_buf;
 }
@@ -186,8 +185,7 @@
     my $command = "$pstamptool -listreq  -name $req_name -not_req_id $req_id";
     # no verbose so that error message about request not found doesn't appear in parse_error.txt
-    my ( $success, $error_msg, $full_buf, $stdout_buf, $stderr_buf ) =
-        run(command => $command, verbose => 0);
-    my $error_code = &parse_error_message ($success, $error_msg, $command);
-    my $exitStatus = $error_code;
+    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
+        ps_run(command => $command, verbose => 0);
+    my $exitStatus = $error_code >> 8;
     if ($success) {
         # -listreq succeeded there is already a request in the database with this name
@@ -285,5 +283,5 @@
     unless ($no_update) {
         my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-            run(command => $command, verbose => $verbose);
+            ps_run(command => $command, verbose => $verbose);
         unless ($success) {
             my_die("$command failed", $PS_EXIT_UNKNOWN_ERROR);
@@ -313,5 +311,5 @@
     my $command = "$pstampdump $request_file_name";
     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-        run(command => $command, verbose => $verbose);
+        ps_run(command => $command, verbose => $verbose);
     unless ($success) {
         print STDERR @$stderr_buf;
@@ -394,5 +392,5 @@
     my $command = "$pstamptool -updatereq -req_id $req_id  -set_label $label";
     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-        run(command => $command, verbose => $verbose);
+        ps_run(command => $command, verbose => $verbose);
     unless ($success) {
         my_die("$command failed", $PS_EXIT_UNKNOWN_ERROR);
@@ -822,5 +820,5 @@
         my $start_addjob = gettimeofday();
         my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-            run(command => $command, verbose => $verbose);
+            ps_run(command => $command, verbose => $verbose);
         unless ($success) {
             print STDERR @$stderr_buf;
@@ -977,5 +975,5 @@
             # mode eq "queue_job"
             my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-                run(command => $command, verbose => $verbose);
+                ps_run(command => $command, verbose => $verbose);
             unless ($success) {
                 print STDERR @$stderr_buf;
@@ -1030,5 +1028,5 @@
         # mode eq "queue_job"
         my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-            run(command => $command, verbose => $verbose);
+            ps_run(command => $command, verbose => $verbose);
         unless ($success) {
             print STDERR @$stderr_buf;
@@ -1139,9 +1137,8 @@
 
     if (!$no_update) {
-        my ( $success, $error_msg, $full_buf, $stdout_buf, $stderr_buf ) =
-            run(command => $command, verbose => $verbose);
-	my $error_code = &parse_error_message ($success, $error_msg, $command);
+        my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
+            ps_run(command => $command, verbose => $verbose);
         unless ($success) {
-            my $fault = $error_code;
+            my $fault = $error_code >> 8;
             print STDERR "$command failed with fault $fault\n";
             if ($fault < $PSTAMP_FIRST_ERROR_CODE) {
@@ -1425,30 +1422,2 @@
     exit $fault;
 }
-
-# if the program exited normally, the exit value is returned
-# if the program exited with a signal (abort, crash, etc), PS_EXIT_PROG_ERROR (4) is returned
-# if the program failed to run, -PS_EXIT_PROG_ERROR (-4) is returned
-sub parse_error_message {
-    my $success = shift;
-    my $error_msg = shift;
-    my $command = shift;
-
-    if ($success) { return 0; }
-
-    print "raw error_msg: $error_msg\n";
-    print "full command: $command\n";
-
-    if (&looks_like_number($error_msg)) { return (($error_msg >> 8) or ($PS_EXIT_PROG_ERROR)); }
-	
-    # which of these match?
-    my ($error_code) = $error_msg =~ m/exited with value (\d+)/;
-    if (defined $error_code) { return $error_code; }
-    
-    ($error_code) = $error_msg =~ m/died with signal (\d+)/;
-#   if (defined $error_code) { return (128 + $error_code); }
-    if (defined $error_code) { return ($PS_EXIT_PROG_ERROR); }
-    
-    # probably failed to execute:
-    return (-1*$PS_EXIT_PROG_ERROR);
-}
-
Index: /branches/eam_branches/ipp-pstamp-20260421/pstamp/scripts/request_finish.pl
===================================================================
--- /branches/eam_branches/ipp-pstamp-20260421/pstamp/scripts/request_finish.pl	(revision 43051)
+++ /branches/eam_branches/ipp-pstamp-20260421/pstamp/scripts/request_finish.pl	(revision 43052)
@@ -10,5 +10,5 @@
 
 use Sys::Hostname;
-use IPC::Cmd 0.36 qw( can_run run );
+use IPC::Cmd 0.36 qw( can_run );
 use File::Temp qw( tempfile );
 use File::Copy;
@@ -19,5 +19,5 @@
 use PS::IPP::Metadata::List qw( parse_md_list );
 
-use PS::IPP::Config qw( :standard );
+use PS::IPP::Config qw( :standard ps_run );
 use PS::IPP::PStamp::RequestFile qw( :standard );
 
@@ -91,5 +91,5 @@
     $command   .= " --save-temps" if $save_temps;
     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-        run(command => $command, verbose => $verbose);
+        ps_run(command => $command, verbose => $verbose);
     unless ($success) {
         die("Unable to perform $command error code: $error_code");
@@ -103,5 +103,5 @@
     $command   .= " -dbserver $dbserver" if $dbserver;
     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-        run(command => $command, verbose => $verbose);
+        ps_run(command => $command, verbose => $verbose);
     unless ($success) {
         die("Unable to perform $command error code: $error_code");
