Index: trunk/ippTasks/detrend.resid.pro
===================================================================
--- trunk/ippTasks/detrend.resid.pro	(revision 19126)
+++ trunk/ippTasks/detrend.resid.pro	(revision 19465)
@@ -100,14 +100,16 @@
 
   task.exec
+    $run = dettool -toresidimfile
     if ($DB:n == 0)
       option DEFAULT
-      command dettool -toresidimfile -limit 20
     else
       # save the DB name for the exit tasks
       option $DB:$detPendingResidImfile_DB
-      command dettool -toresidimfile -limit 20 -dbname $DB:$detPendingResidImfile_DB
+      $run = $run -dbname $DB:$detPendingResidImfile_DB
       $detPendingResidImfile_DB ++
       if ($detPendingResidImfile_DB >= $DB:n) set detPendingResidImfile_DB = 0
     end
+    add_poll_args run
+    command $run
   end
 
@@ -221,14 +223,16 @@
 
   task.exec
+    $run = dettool -toresidexp
     if ($DB:n == 0)
       option DEFAULT
-      command dettool -toresidexp -limit 20
     else
       # save the DB name for the exit tasks
       option $DB:$detPendingResidExp_DB
-      command dettool -toresidexp -limit 20 -dbname $DB:$detPendingResidExp_DB
+      $run = $run -dbname $DB:$detPendingResidExp_DB
       $detPendingResidExp_DB ++
       if ($detPendingResidExp_DB >= $DB:n) set detPendingResidExp_DB = 0
     end
+    add_poll_args run
+    command $run
   end
 
@@ -335,14 +339,16 @@
 
   task.exec
+    $run = dettool -pendingcleanup_residimfile
     if ($DB:n == 0)
       option DEFAULT
-      command dettool -pendingcleanup_residimfile -limit 20
     else
       # save the DB name for the exit tasks
       option $DB:$detCleanupResidImfile_DB
-      command dettool -pendingcleanup_residimfile -limit 20 -dbname $DB:$detCleanupResidImfile_DB
+      $run = $run -dbname $DB:$detCleanupResidImfile_DB
       $detCleanupResidImfile_DB ++
       if ($detCleanupResidImfile_DB >= $DB:n) set detCleanupResidImfile_DB = 0
     end
+    add_poll_args run
+    command $run
   end
 
@@ -442,14 +448,16 @@
 
   task.exec
+    $run = dettool -pendingcleanup_residexp
     if ($DB:n == 0)
       option DEFAULT
-      command dettool -pendingcleanup_residexp -limit 20
     else
       # save the DB name for the exit tasks
       option $DB:$detCleanupResidExp_DB
-      command dettool -pendingcleanup_residexp -limit 20 -dbname $DB:$detCleanupResidExp_DB
+      $run = $run -dbname $DB:$detCleanupResidExp_DB
       $detCleanupResidExp_DB ++
       if ($detCleanupResidExp_DB >= $DB:n) set detCleanupResidExp_DB = 0
     end
+    add_poll_args run
+    command $run
   end
 
