[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 1/2] tools/helpers: Introduce cmp-fd-file-inode utility

Jason Andryuk writes ("[PATCH 1/2] tools/helpers: Introduce cmp-fd-file-inode 
> This is a C implementation of the perl code inside of locking.sh to
> check that the locked file descriptor and lock file share the same inode
> and therefore match.  One change from the perl version is replacing
> printing "y" on success with exit values of 0 (shell True) and 1 (shell
> False).

Maybe it would be better to use stat(1) ?  On Linux
   stat -L -c%D.%i /dev/stdin blah.lock
or some such, and then compare the two numbers.

I'm reluctant to host a general-purpose shell utility in xen.git, no
matter how useful...


Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.