Re: [Xen-devel] [PATCH] scripts: Use stat to check lock claim

2020-03-11 Thread Jason Andryuk
On Tue, Mar 10, 2020 at 4:06 PM Jason Andryuk wrote: > > On Tue, Mar 10, 2020 at 11:43 AM Ian Jackson wrote: > > Alternatively, if you don't mind using --printf instead of -c, > > > > $ bash -c 'x=$( stat -L --format "%D.%i " t u 2>/dev/null || : ); echo > > ${x%% *} = ${x#* }' > > fe04.844307

Re: [Xen-devel] [PATCH] scripts: Use stat to check lock claim

2020-03-10 Thread Jason Andryuk
On Tue, Mar 10, 2020 at 11:43 AM Ian Jackson wrote: > > Jason Andryuk writes ("[PATCH] scripts: Use stat to check lock claim"): > > Replace the perl locking check with stat(1). Stat is able to fstat > > stdin (file descriptor 0) when passed '-' as an argument. This is now > > used to check

Re: [Xen-devel] [PATCH] scripts: Use stat to check lock claim

2020-03-10 Thread Ian Jackson
Jason Andryuk writes ("[PATCH] scripts: Use stat to check lock claim"): > Replace the perl locking check with stat(1). Stat is able to fstat > stdin (file descriptor 0) when passed '-' as an argument. This is now > used to check $_lockfd. stat(1) support for '-' was introduced to > coreutils in

Re: [Xen-devel] [PATCH] scripts: Use stat to check lock claim

2020-03-10 Thread Wei Liu
On Tue, Mar 10, 2020 at 09:29:04AM -0400, Jason Andryuk wrote: > Replace the perl locking check with stat(1). Stat is able to fstat > stdin (file descriptor 0) when passed '-' as an argument. This is now > used to check $_lockfd. stat(1) support for '-' was introduced to > coreutils in 2009. >

[Xen-devel] [PATCH] scripts: Use stat to check lock claim

2020-03-10 Thread Jason Andryuk
Replace the perl locking check with stat(1). Stat is able to fstat stdin (file descriptor 0) when passed '-' as an argument. This is now used to check $_lockfd. stat(1) support for '-' was introduced to coreutils in 2009. After A releases its lock, script B will return from flock and execute