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

2020-03-06 Thread Jason Andryuk
On Thu, Mar 5, 2020 at 2:12 PM Ian Jackson wrote: > > Jason Andryuk writes ("Re: [PATCH 1/2] tools/helpers: Introduce > cmp-fd-file-inode utility"): > > I'd be happy to use stat if it works. The comment in locking.sh above > > the usage is: > > # We can't just stat /dev/stdin or /proc/se

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

2020-03-05 Thread Ian Jackson
Jason Andryuk writes ("Re: [PATCH 1/2] tools/helpers: Introduce cmp-fd-file-inode utility"): > I'd be happy to use stat if it works. The comment in locking.sh above > the usage is: > # We can't just stat /dev/stdin or /proc/self/fd/$_lockfd or > # use bash's test -ef because those

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

2020-03-05 Thread George Dunlap
On Wed, Feb 26, 2020 at 3:49 PM Ian Jackson wrote: > Jason Andryuk writes ("[PATCH 1/2] tools/helpers: Introduce > cmp-fd-file-inode utility"): > > 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 > >

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

2020-02-26 Thread Rich Persaud
On Feb 26, 2020, at 11:07, Jason Andryuk wrote: > >> On Wed, Feb 26, 2020 at 10:48 AM Ian Jackson wrote: >> Jason Andryuk writes ("[PATCH 1/2] tools/helpers: Introduce >> cmp-fd-file-inode utility"): >>> This is a C implementation of the perl code inside of locking.sh to >>> check that the lo

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

2020-02-26 Thread Jason Andryuk
On Wed, Feb 26, 2020 at 10:48 AM Ian Jackson wrote: > > Jason Andryuk writes ("[PATCH 1/2] tools/helpers: Introduce cmp-fd-file-inode > utility"): > > 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 >

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

2020-02-26 Thread Ian Jackson
Jason Andryuk writes ("[PATCH 1/2] tools/helpers: Introduce cmp-fd-file-inode utility"): > 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 repl

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

2020-02-26 Thread Jason Andryuk
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). Requiring