On Tue, May 19, 2015 at 2:43 AM, Max Kellermann <[email protected]> wrote:

> On 2015/05/19 02:07, Yclept Nemo <[email protected]> wrote:
> > On Mon, May 18, 2015 at 5:27 PM, Ben Boeckel <[email protected]> wrote:
> >
> > > Supporting a command (for tools such as pass[1]) would also be good.
> > > Also, is there any additional documentation along with this?
> > >
> >
> > So a password_backend ("command") that runs a command and retrieves
> stdout
> > and return code? Any recommendations boost, popen, etc?
>
> That was one thing I didn't agree with.  I wouldn't do that


I'm now seriously considering this. Libsecret is only available on linux,
and while I think it is fairly ubiquitous among desktop environments, many
roll-your-own setups may not use it. I think complexity is a moot point;
spawning a process is less complicated than the hidden complexity of
libsecret (dbus, glib). I'd like recommendations for libraries:

1] PStreams
url: http://pstreams.sourceforge.net/doc/.
pro: cross platform
pro: simple
pro: does not run in shell
con: lgpl, if I understand requires a in-tree source copy to be compatible
with gpl
con: no builtin timeout, would require non-blocking loop + sleep

2] fork/exec or CreateProcess
details: create wrapper function: int (for return status)
run_process(command, stdout buffer, stdout buffer size, stder buffer,
stderr buffer size, timeout)
pro: simple
con: more work (unfamiliar with and can't test CreateProcess, more room for
bugs)

3] spawn or _spawn
pro: cross platform
pro: simple
con: runs in shell

4] boost.process
uri: http://www.highscore.de/boost/process/
con: not prepackaged for ubuntu
_______________________________________________
mpd-devel mailing list
[email protected]
http://mailman.blarg.de/listinfo/mpd-devel

Reply via email to