_dbus_shell_parse_argv

Lawrence D'Oliveiro ldo at geek-central.gen.nz
Thu May 25 05:46:15 UTC 2017


I am trying to understand the point of the _dbus_shell_parse_argv
routine <https://cgit.freedesktop.org/dbus/dbus/tree/dbus/dbus-shell.h>,
<https://cgit.freedesktop.org/dbus/dbus/tree/dbus/dbus-shell.c>. It
seems like it goes to an awful lot of work to provide a very limited
set of functionality. If you want to handle a shell command line, why
not use the shell to do it?

    char * argv[4];
    argv[0] = "/bin/sh";
    argv[1] = "-c";
    argv[2] = «command»;
    argv[3] = 0;
    execvpe(argv[0], argv, «env»);


More information about the dbus mailing list