Skip to content

Commit

Permalink
clusterd: fix timeouts
Browse files Browse the repository at this point in the history
fixes issue #82
  • Loading branch information
wwwutz committed Apr 12, 2019
1 parent 9a9993c commit 01fb092
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion clusterd/clusterd
Original file line number Diff line number Diff line change
Expand Up @@ -1211,7 +1211,10 @@ sub clp_rx_LSOF {
defined $pid or die "$!\n";
unless ($pid) {
$socket->blocking(1);
open P,'timeout -k 32s 30s lsof -n|' or die "$!\n";
# -n inhibits the conversion of network numbers to host names for network files.
# -b causes lsof to avoid kernel functions that might block - lstat(2), readlink(2), and stat(2).
# -w disables warning messages.
open P,'timeout -k 92s 90s lsof -n -b -w|' or die "$!\n";
while (<P>) {
next if defined $pattern && index($_,$pattern)<0;
$socket->send(pack('n',length($_)).$_,0);
Expand Down

0 comments on commit 01fb092

Please sign in to comment.