Index: trunk/ippScripts/scripts/detrend_norm_apply.pl
===================================================================
--- trunk/ippScripts/scripts/detrend_norm_apply.pl	(revision 10625)
+++ trunk/ippScripts/scripts/detrend_norm_apply.pl	(revision 10700)
@@ -123,3 +123,8 @@
 }
 
-END { system("sync") == 0 or die "failed to execute sync: $!" }
+END {
+    my $status = $?;
+    system("sync") == 0
+        or die "failed to execute sync: $!" ;
+    $? = $status;
+}
Index: trunk/ippScripts/scripts/detrend_norm_calc.pl
===================================================================
--- trunk/ippScripts/scripts/detrend_norm_calc.pl	(revision 10625)
+++ trunk/ippScripts/scripts/detrend_norm_calc.pl	(revision 10700)
@@ -158,3 +158,8 @@
 }
 
-END { system("sync") == 0 or die "failed to execute sync: $!" }
+END {
+    my $status = $?;
+    system("sync") == 0
+        or die "failed to execute sync: $!" ;
+    $? = $status;
+}
Index: trunk/ippScripts/scripts/detrend_norm_exp.pl
===================================================================
--- trunk/ippScripts/scripts/detrend_norm_exp.pl	(revision 10625)
+++ trunk/ippScripts/scripts/detrend_norm_exp.pl	(revision 10700)
@@ -147,5 +147,10 @@
 }
 
-END { system("sync") == 0 or die "failed to execute sync: $!" }
+END {
+    my $status = $?;
+    system("sync") == 0
+        or die "failed to execute sync: $!" ;
+    $? = $status;
+}
 
 __END__
Index: trunk/ippScripts/scripts/detrend_process_exp.pl
===================================================================
--- trunk/ippScripts/scripts/detrend_process_exp.pl	(revision 10625)
+++ trunk/ippScripts/scripts/detrend_process_exp.pl	(revision 10700)
@@ -147,5 +147,10 @@
 }
 
-END { system("sync") == 0 or die "failed to execute sync: $!" }
+END {
+    my $status = $?;
+    system("sync") == 0
+        or die "failed to execute sync: $!" ;
+    $? = $status;
+}
 
 __END__
Index: trunk/ippScripts/scripts/detrend_process_imfile.pl
===================================================================
--- trunk/ippScripts/scripts/detrend_process_imfile.pl	(revision 10625)
+++ trunk/ippScripts/scripts/detrend_process_imfile.pl	(revision 10700)
@@ -128,5 +128,10 @@
 }
 
-END { system("sync") == 0 or die "failed to execute sync: $!" }
+END {
+    my $status = $?;
+    system("sync") == 0
+        or die "failed to execute sync: $!" ;
+    $? = $status;
+}
 
 __END__
Index: trunk/ippScripts/scripts/detrend_reject_exp.pl
===================================================================
--- trunk/ippScripts/scripts/detrend_reject_exp.pl	(revision 10625)
+++ trunk/ippScripts/scripts/detrend_reject_exp.pl	(revision 10700)
@@ -215,5 +215,10 @@
 }
 
-END { system("sync") == 0 or die "failed to execute sync: $!" }
+END {
+    my $status = $?;
+    system("sync") == 0
+        or die "failed to execute sync: $!" ;
+    $? = $status;
+}
 
 # Retrieve the requested rejection limit, dying if not extant
Index: trunk/ippScripts/scripts/detrend_reject_imfile.pl
===================================================================
--- trunk/ippScripts/scripts/detrend_reject_imfile.pl	(revision 10625)
+++ trunk/ippScripts/scripts/detrend_reject_imfile.pl	(revision 10700)
@@ -247,5 +247,10 @@
 }
 
-END { system("sync") == 0 or die "failed to execute sync: $!" }
+END {
+    my $status = $?;
+    system("sync") == 0
+        or die "failed to execute sync: $!" ;
+    $? = $status;
+}
 
 
Index: trunk/ippScripts/scripts/detrend_stack.pl
===================================================================
--- trunk/ippScripts/scripts/detrend_stack.pl	(revision 10625)
+++ trunk/ippScripts/scripts/detrend_stack.pl	(revision 10700)
@@ -133,5 +133,10 @@
 }
 
-END { system("sync") == 0 or die "failed to execute sync: $!" }
+END {
+    my $status = $?;
+    system("sync") == 0
+        or die "failed to execute sync: $!" ;
+    $? = $status;
+}
 
 __END__
Index: trunk/ippScripts/scripts/inject.pl
===================================================================
--- trunk/ippScripts/scripts/inject.pl	(revision 10625)
+++ trunk/ippScripts/scripts/inject.pl	(revision 10700)
@@ -128,4 +128,11 @@
 }
 
+END {
+    my $status = $?;
+    system("sync") == 0
+        or die "failed to execute sync: $!" ;
+    $? = $status;
+}
+
 
 __END__
Index: trunk/ippScripts/scripts/mdc2list.pl
===================================================================
--- trunk/ippScripts/scripts/mdc2list.pl	(revision 10625)
+++ trunk/ippScripts/scripts/mdc2list.pl	(revision 10700)
@@ -70,3 +70,8 @@
 }
 
-END { system("sync") == 0 or die "failed to execute sync: $!" }
+END {
+    my $status = $?;
+    system("sync") == 0
+        or die "failed to execute sync: $!" ;
+    $? = $status;
+}
Index: trunk/ippScripts/scripts/phase2.pl
===================================================================
--- trunk/ippScripts/scripts/phase2.pl	(revision 10625)
+++ trunk/ippScripts/scripts/phase2.pl	(revision 10700)
@@ -112,5 +112,10 @@
 }
 
-END { system("sync") == 0 or die "failed to execute sync: $!" }
+END {
+    my $status = $?;
+    system("sync") == 0
+        or die "failed to execute sync: $!" ;
+    $? = $status;
+}
 
 __END__
Index: trunk/ippScripts/scripts/phase3.pl
===================================================================
--- trunk/ippScripts/scripts/phase3.pl	(revision 10625)
+++ trunk/ippScripts/scripts/phase3.pl	(revision 10700)
@@ -152,5 +152,10 @@
 }
 
-END { system("sync") == 0 or die "failed to execute sync: $!" }
+END {
+    my $status = $?;
+    system("sync") == 0
+        or die "failed to execute sync: $!" ;
+    $? = $status;
+}
 
 __END__
