Stas,

I had the following in my code:

      my($nOrgPID) = fork;
      exit if $nOrgPID;
      die "Could not fork: $!" unless defined $nOrgPID;

      close STDIN;
      close STDOUT;
      close STDERR;
      setsid() or die "Could not start new session: $!";


but that didn't work, however when I changed it to this:

      my($nOrgPID) = fork;
      exit if $nOrgPID;
      die "Could not fork: $!" unless defined $nOrgPID;

      require 'sys/syscall.ph';
      for (my $i=0; $i<=255; $i++) {
         syscall(&SYS_close, $i + 0);  # must force numeric
      }

      setsid() or die "Could not start new session: $!";


the socket got released and I could restart the server. I 
know it is a little crud, but it seems to work.


Kees

Reply via email to