title: Signal SIGSTOP received, but no signal handler set in perl script
body: <p>I have the following code in my perl script which somehow doesn't seem to work:</p>
  
  <pre><code>my $thr;
  
  sub start__server_thread()
  {
          $thr = threads-&gt;create(\&amp;iperf_start_server, $_[0], $_[1], $_[2]);
          print("Value of thread is $thr\n");
          &amp;START_SERVER_RESPONSE($controller_ip, $controller_port, "success", 2345, $_[1]);
  }
  
  sub iperf_start_server()
  {
  # Do some stuff here and then handle the signal
  $SIG{'SIGSTOP'} = sub {
          print("Stop signal received\n");
          $thr-&gt;exit();
          $flag = 1;
          };
  }
  
  sub stop_server()
  {
          my ($dat,$filelog,$result);
          $thr-&gt;kill('STOP');
          $flag = 1;
          sleep(10);
          $thr-&gt;exit(1);
  }
  </code></pre>
  
  <p>When from some other context stop_server() is called, it tries to send the SIGSTOP signal to the thread. It is at this point that the execution stops and I get the error "Signal SIGSTOP received, but no  signal handler set in perl script. Where have i gone wrong?</p>