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

Re: pthreads and sigaltstack on i386



>How are you compiling it? Seems to work okay under
unstable.
> Sends itself SIGUSR1, goes into sigsuspend, is woken
up, handles
> the signal, and exits (by the way, main always
returns an int ;).
>
> I don't see any threads stuff, so how the
pthread_sighandler error?
>
> I compiled as:
> $ gcc -g -Wall -o sigstack sigstack.c

I left out the pthread stuff for simplicity since it
doesn't appear essential to demonstrate the problem. 
And indeed, I know that the above compile line works. 
But now try:

   gcc -g -Wall -o sigstack sigstack.c -lpthread

This is enough to enable pthread stuff to break the
code.  Running the code under gdb confirms that
pthreads are active.

Bob

__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/



Reply to: