/[Sack]/trunk/lib/Sack/Node.pm
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/lib/Sack/Node.pm

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

revision 119 by dpavlin, Tue Oct 6 23:04:45 2009 UTC revision 120 by dpavlin, Wed Oct 7 10:05:32 2009 UTC
# Line 23  sub new { Line 23  sub new {
23          my $pid_path = "/tmp/sack.$port.pid";          my $pid_path = "/tmp/sack.$port.pid";
24          if ( -e $pid_path ) {          if ( -e $pid_path ) {
25                  my $pid = read_file $pid_path;                  my $pid = read_file $pid_path;
26                  kill 0, $pid && kill 9, $pid && warn "[$port] kill old $pid\n";                  kill 9, $pid; # warn "[$port] kill old $pid\n";
27          }          }
28          write_file $pid_path, $$;          write_file $pid_path, $$;
29    
# Line 44  sub new { Line 44  sub new {
44          while ( 1 ) {          while ( 1 ) {
45    
46                  my $data = Storable::fd_retrieve( $client );                  my $data = Storable::fd_retrieve( $client );
47                  warn "[$port] <<<<\n";  #               warn "[$port] <<<<\n";
48                  warn "[$port] data = ", dump( $data ) if $self->{debug};                  warn "[$port] data = ", dump( $data ) if $self->{debug};
49    
50                  my $result;                  my $result;
# Line 74  sub new { Line 74  sub new {
74                          $result = { 'error' => $data };                          $result = { 'error' => $data };
75                  }                  }
76    
77                  warn "[$port] >>>>\n";  #               warn "[$port] >>>>\n";
78                  Storable::store_fd( $result => $client );                  Storable::store_fd( $result => $client );
79          }          }
80    

Legend:
Removed from v.119  
changed lines
  Added in v.120

  ViewVC Help
Powered by ViewVC 1.1.26