Hi,

I've a problem with a C program:
This is a multithread client/server; there are 3 mains threads
functions:
- one to receive signals (pthread_setmask() SIGQUIT, HUP, ALRM,
sigwait()...)
- one to proceed tasks (pthread_cond_wait in an infinite loop)
- one to accept tcp cnx (listen, accept, fgets...)
a client can connect to the server (via a tcp port) and send cmd;
each new cnx creates a new thread.
Some commands generate something like a queue of tasks.
Theses tasks are proceeded by the action thread: the client thread sends
a
pthread_cond_broadcast to the action thread, so it begins to proceed the
queue.
The action thread has to launch external progs. this is done by vfork
and execve.
so it is the action thread which vfork and execve.

problem:
each time the external cmd is called the program freezes.
it seems that prog unfreeze only when the external cmd is over.
I try to play with  sigaction and SA_NOCLDWAIT too but without
any results.

Any idea and suggestion are welcome

Regards.


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to