original_string: public function serve()
      {
          $this->transport_->listen();
  
          while (!$this->stop_) {
              try {
                  $transport = $this->transport_->accept();
  
                  if ($transport != null) {
                      $pid = pcntl_fork();
  
                      if ($pid > 0) {
                          $this->handleParent($transport, $pid);
                      } elseif ($pid === 0) {
                          $this->handleChild($transport);
                      } else {
                          throw new TException('Failed to fork');
                      }
                  }
              } catch (TTransportException $e) {
              }
  
              $this->collectChildren();
          }
      }
code: public function serve()
      {
          $this->transport_->listen();
  
          while (!$this->stop_) {
              try {
                  $transport = $this->transport_->accept();
  
                  if ($transport != null) {
                      $pid = pcntl_fork();
  
                      if ($pid > 0) {
                          $this->handleParent($transport, $pid);
                      } elseif ($pid === 0) {
                          $this->handleChild($transport);
                      } else {
                          throw new TException('Failed to fork');
                      }
                  }
              } catch (TTransportException $e) {
              }
  
              $this->collectChildren();
          }
      }
code_tokens: public function serve ( ) { $ this -> transport_ -> listen ( ) ; while ( ! $ this -> stop_ ) { try { $ transport = $ this -> transport_ -> accept ( ) ; if ( $ transport != null ) { $ pid = pcntl_fork ( ) ; if ( $ pid > 0 ) { $ this -> handleParent ( $ transport , $ pid ) ; } elseif ( $ pid === 0 ) { $ this -> handleChild ( $ transport ) ; } else { throw new TException ( 'Failed to fork' ) ; } } } catch ( TTransportException $ e ) { } $ this -> collectChildren ( ) ; } }
docstring: Listens for new client using the supplied
  transport. We fork when a new connection
  arrives.
  
  @return void
docstring_tokens: Listens for new client using the supplied transport . We fork when a new connection arrives .