Can fork be used in a signal handler?



Hello group,

I have a problem that i have to create a new process, when my process
gets a SIGCHLD.
So i want to use fork inside the signal handler for SIGCHLD.

Can i use like that? I know that non-reentrant functions can not be
used inside a signal handler. Is fork() a reentrant function or not?

And in the signal handler i'm traversing a linked list which has the
complexity of O(n2). Is that ok if a signal handler to be that heavy?
Note: no global variables are being changed inside the handler.

Please assist me ASAP.

Thanks.

-Kiran.
.