[pass] [PATCH v2] clip: don't race between pass instances in restore
Jason A. Donenfeld
Jason at zx2c4.com
Sat Mar 22 08:20:40 CET 2014
On Mar 22, 2014 1:15 AM, "Matthew Cengia" <mattcen at gmail.com> wrote:
>
> On 2014-03-22 01:01, Jason A. Donenfeld wrote:
> [...]
> > By the way, can you think of any way to wait for the ppid to exit,
that's
> > less racy than sleep or polling? We can't wait() because we aren't the
> > parent, and inotify (on /proc/pid) is Linux-only and the CLI utilities
> > aren't standard... I'd like a way to wait() on the ppid essentially,
that's
> > portable.
>
> Sorry, which bit of code are you talking about now, re: the ppid?
The && sleep 0.1 is to give the parent process of the killed sleep time to
restore the clipboard.
>
> Incidentally, I can't help but wonder whether all this effort of
> managing locking and the clipboard is far more complex than just having
> pass not exit until it's reset the clipboard. The interface would be
> something like:
Woah!! It turns out xclip has a -l option. With -l 1, it could block until
it's been pasted, and then restore and quit. Sounds nice...
Question: does pbpaste do that on OSX?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.zx2c4.com/pipermail/password-store/attachments/20140322/c18be3d1/attachment.html>
More information about the Password-Store
mailing list