spawn problem

Hi all!
I have a problem using spawnl().
The caller is a resmgr. A control function gets called every time a timer fires (1kHz). This control function tries to spawn another process (only once!).
Once the spawnl() call is made, the spawned process is SEND blocked on the calling process, which is REPLY blocked on procnto. The spawnl() call never returns. The spawned process does not depend on the calling process to run. I get this behavior even with a simple spawn of “/bin/ls”…
Any clues?
Thanks!

Without code it’s harder to pin point, but in the pass, it is usually happened when,

Your resmgr have a connection to yourself (an open fd), where, during spawn().
procnto will try to DUP this fd, by sending an _IO_DUP message to the fd’s
server, which is, your resmgr itself. If your resmgr is single threaded, this
dead locked.

You either want to use the more low level spawn() as it gives you fine control
of what fd to dup; or you should fcntl() that fd to FD_CLOSEXEC, so it won’t
be dupped during a spawn().

Yep, right on! Worked fine by setting the FD_CLOEXEC flag.
Thanks!