On Fri, 1 Jun 2007, anubhuti wrote:

Hi,

I have a small program shown below:
[ ... ]
This should print k = 24,0,0 and then the thread should again go into wait. But instead the program gets the signal 24 and is stopped(basically, it executes the default signal handler of SIGTSTP).

This program works fine on other platforms like HP, AIX and Linux.
Can anyone tell me why this is not working on solaris?

See sigwait(2):

NOTES
     The sigwait() function cannot be used to  wait  for  signals
     that  cannot  be caught (see sigaction(2)). This restriction
     is silently imposed by the system.

See sigaction(2):

ERRORS
     The sigaction() function will fail if:

     EINVAL    The value of the sig argument is not a valid  sig-
               nal  number or is equal to  SIGKILL or SIGSTOP. In
               addition, if in a  multithreaded  process,  it  is
               equal to SIGWAITING, SIGCANCEL, or SIGLWP.

In short, you cannot catch SIGSTOP.

No, I don't know why/whether it works on other platforms.

FrankH.



Thanks


This message posted from opensolaris.org
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to