[pass] [PATCH v2] clip: don't race between pass instances in restore

Matthew Cengia mattcen at gmail.com
Sat Mar 22 07:42:20 CET 2014


On 2014-03-22 00:22, Jason A. Donenfeld wrote:
[...]
> What do you make of this one?
> 
> - kill -9 $(grep -l -r --include="cmdline" "^$sleep_argv0" /proc/
> 2>/dev/null | sed -n 's:/proc/\([0-9]\+\)/.*:\1:p' | sort | uniq)
> 2>/dev/null && sleep 0.1
> + pkill -f "^$sleep_argv0" && sleep 0.1
> 
> Super simple.
> 
> Looks like OSX and FreeBSD both have pkill too:
> http://www.freebsd.org/cgi/man.cgi?query=pkill&sektion=1 and
> https://developer.apple.com/library/mac/documentation/Darwin/Reference/Manpages/man1/pkill.1.html

If you're happy relying on that, I won't object. I didn't suggest pkill
because it's not POSIX, and aside from Bash, I usually try to stick to
external binaries that are POSIX-compliant. As you say though, both OSX
and FreeBSD seem to have pkill, so this works for me.

-- 
Regards,
Matthew Cengia
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 966 bytes
Desc: Digital signature
URL: <http://lists.zx2c4.com/pipermail/password-store/attachments/20140322/d30a587b/attachment-0001.asc>


More information about the Password-Store mailing list