Permalink
Browse files

be sure to tie unused stdin/stdout/stderr to /dev/null so ssh returns…

…, also i think disown is unnecessary
  • Loading branch information...
1 parent 95c413a commit 7531f6fe735636656e49b2ba8e69722be8bba74e @erikfrey committed Mar 9, 2009
Showing with 2 additions and 2 deletions.
  1. +2 −2 br
View
4 br
@@ -78,8 +78,8 @@ do
mkfifo $jobpath/out/$host_idx
# lets get the pid of our listener
ssh -n $host "mkdir -p $nodepath"
- pid=`ssh -n $host "nc -l -p $port_out > $nodepath/in_$host_idx & jobs -l && disown" | awk {'print $2'}`
- ssh $host -n "tail -s0.1 -f --pid=$pid $nodepath/in_$host_idx | sort -k$mapcolumn,$mapcolumn $reduce | nc -q0 -l -p $port_in > /dev/null & disown"
+ pid=`ssh -n $host "nc -l -p $port_out > $nodepath/in_$host_idx 2> /dev/null < /dev/null & jobs -l" | awk {'print $2'}`
+ ssh $host -n "tail -s0.1 -f --pid=$pid $nodepath/in_$host_idx | sort -k$mapcolumn,$mapcolumn $reduce | nc -q0 -l -p $port_in >& /dev/null &"
# our local forwarders
nc $host $port_in > $jobpath/in/$host_idx &
nc -q0 $host $port_out < $jobpath/out/$host_idx &

0 comments on commit 7531f6f

Please sign in to comment.