checkpoint/restart

Hiten Pandya hmp at backplane.com
Sat Oct 11 06:03:19 PDT 2003


Matthew Dillon wrote:

:I hope this isn't a stupid question, but how do I get the inode/dev_t for
:binary of the process itself? I'm sure I can find it, but you probably
:know off hand.
    There are two ways.  The binary itself is stored in the process 
    structure as p_textvp.  You can perform a stat on the vnode (I forget
    the VOP_ that does that).  But this is deficient for a number of
    reasons.
	Hmm, I guess a call to VOP_GETATTR() should suffice.  Although a
	check would need to be done in the case where va_fsid is -1, but
	I am not sure if the check is needed in this context.
	Regards,

--
Hiten Pandya
hmp at xxxxxxxxxxxxx





More information about the Kernel mailing list