Re: Signals, sockets and threads

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>>>>> "Twisti" == Christian Thalinger <twisti@xxxxxxxxxxxxxxxxxxxxx> writes:

Twisti> I've implemented Robert's suggestion today and it seems to work (at
Twisti> least on linux).  I used SIGHUP for now.  Why does GCJ use SIGUSR2 on
Twisti> non-linux and freebsd OSes?  Any good reason for that?

Here's the code.  Looks like we originally wanted SIGUSR2 everywhere
but were working around a LinuxThreads bug.

// The signal to use when interrupting a thread.
#if defined(LINUX_THREADS) || defined(FREEBSD_THREADS)
  // LinuxThreads (prior to glibc 2.1) usurps both SIGUSR1 and SIGUSR2.
  // GC on FreeBSD uses both SIGUSR1 and SIGUSR2.
#  define INTR SIGHUP
#else /* LINUX_THREADS */
#  define INTR SIGUSR2
#endif /* LINUX_THREADS */

Tom


[Index of Archives]     [Linux Kernel]     [Linux Cryptography]     [Fedora]     [Fedora Directory]     [Red Hat Development]

  Powered by Linux