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

Matthew Cengia mattcen at gmail.com
Sat Mar 22 08:15:47 CET 2014


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?

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:

  mattcen at owen:tmp$ pass -c example
  Copied example to clipboard. Will clear in 45 seconds.
  Hit Ctrl+C to clear and exit immediately

And just put in a trap on SIGINT that clears the clipboard before
quitting.

Have I missed something? Is there a good reason for pass to return
control back to the shell before you've pasted the password?

-- 
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/7c2851b4/attachment.asc>


More information about the Password-Store mailing list