-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 If a signal is sent via kill() or tkill() the kernel fills in the wrong PID value in the siginfo_t structure (obviously only if the handler has SA_SIGINFO set). POSIX specifies the the si_pid field is filled with the process ID. The kernel currently fills in the thread ID. The thread IDs are not useful at all at userlevel. They are not exposed anywhere. One might argue that sending up the ID of the thread as well is a good thing but I don't agree. This is what sigqueue is for: one can attach arbitrary data to the signal and get it transmitted (the sigval_t parameter). I've attached a patch for the current 2.5 kernel and a test case. Whoever collects kernel tests might want to add the program. - -- - --------------. ,-. 444 Castro Street Ulrich Drepper \ ,-----------------' \ Mountain View, CA 94041 USA Red Hat `--' drepper at redhat.com `--------------------------- -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQE/BewL2ijCOnn/RHQRAtnYAKCmG6vX3YFo9ko8kjwzvNObxrklfACfVga3 43za5G4ljJwJD1SZEqrr+eU= =lfde -----END PGP SIGNATURE-----