Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - does the dup() callout in _resmgr_io_funcs catch calls to spawn()?: (2 Items)
   
does the dup() callout in _resmgr_io_funcs catch calls to spawn()?  
I am developing a resource manager for my mount point, and have implemented a callout for the dup, as show below:

 int io_dup(resmgr_context_t *ctp, io_dup_t *msg, RESMGR_OCB_T *ocb);

resmgr_io_funcs_t       io_funcs;
io_funcs.dup = io_dup;

resmgr_attach (dpp, &rattr, "<MY MOUNT POINT>", _FTYPE_ANY, _RESMGR_FLAG_BEFORE | _RESMGR_FLAG_DIR, &connect_funcs, &io_funcs, &
ioattr);

should I expect my io_dup() callout to be called when a client program that executes from within my mount point and 
spawns() another process that also exists within my mount point?

Actually, even when my client program issues a simple dup() call within it to duplicate a fd, my io_dup() does not get 
called.

Any ideas?
RE: does the dup() callout in _resmgr_io_funcs catch calls to spawn()?  
File descriptors which are dup()ed at spawn/exec time will cause IO_DUP messages to be sent.  In fact, it is this 
behaviour which can race (e.g. if another thread in the process closes an fd) resulting in an EBADF.