0 Replies Latest reply on Jan 14, 2010 6:25 AM by 807559

    kill(getpid(), sig) VS. raise(sig) issue in thread

      Hi, I meet a problem. When I use kill(getpid(), sig) in a thread to send a signal to current process on Solaris 10, the program often does some weird behavior such as enter signal handler multi-times, sigaction() not work well and some times I must press ctrl+z many times (basicly equals the number of thread in current process) to suspend the current process. Furthermore, I found that if using raise(sig) instead of kill() , the weird issue are dispeared.

      As far as I know, the raise(sig) should just invoke kill(getpid(), sig), but it seems not simple like that in multithread environment. So are there some specical difference between them in multithread environment ? Does any body know that? Thanks.