added forking on each tftp request
authorDobrica Pavlinusic <dpavlin@rot13.org>
Sat, 9 Oct 2010 13:50:38 +0000 (13:50 +0000)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Sat, 9 Oct 2010 13:50:38 +0000 (13:50 +0000)
this allows faster booting of multiple clients
at the same time

lib/PXElator/tftpd.pm

index 75dd22c..9eb6f73 100644 (file)
@@ -45,6 +45,13 @@ sub tftp_request {
 
        warn 'request: ', dump( $request ) if $debug;
 
+       if ( my $pid = fork ) {
+               # parent
+               warn "# forked $pid\n";
+               return;
+       }
+
+
        my $ip = $request->{_REQUEST_}->{PeerAddr};
        config::for_ip( $ip );