/[Sack]/trunk/bin/sack.pl
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/bin/sack.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 74 by dpavlin, Fri Sep 25 18:52:58 2009 UTC revision 75 by dpavlin, Fri Sep 25 20:31:38 2009 UTC
# Line 350  sub info_tabs { Line 350  sub info_tabs {
350    
351    
352  if ( $port ) {  if ( $port ) {
353    
354            my $pid_path = "/tmp/sack.$port.pid";
355            if ( -e $pid_path ) {
356                    my $pid = read_file $pid_path;
357                    kill 9, $pid && warn "[$port] kill old $pid";
358            }
359            write_file $pid_path, $$;
360    
361    
362          my $sock = IO::Socket::INET->new(          my $sock = IO::Socket::INET->new(
363                  Listen    => SOMAXCONN,                  Listen    => SOMAXCONN,
364                  LocalAddr => '127.0.0.1',                  LocalAddr => '127.0.0.1',
# Line 402  if ( $port ) { Line 411  if ( $port ) {
411                          warn "[$port] UNKNOWN $header[0]";                          warn "[$port] UNKNOWN $header[0]";
412                  }                  }
413    
414                    $client->close;
415    
416          }          }
417  }  }
418    

Legend:
Removed from v.74  
changed lines
  Added in v.75

  ViewVC Help
Powered by ViewVC 1.1.26