mirror of
https://github.com/flatpak/flatpak.git
synced 2026-07-08 07:07:35 -04:00
run: Use --args=fd for dbus-proxy
This shortens the commandline length of the proxy a lot, making it typically: /usr/libexec/flatpak-bwrap --args 20 /usr/libexec/flatpak-dbus-proxy --args=23 This looks a lot nicer in ps. Closes: #1676 Approved by: alexlarsson
This commit is contained in:
committed by
Atomic Bot
parent
b1506e1633
commit
744f4cb59d
@@ -730,6 +730,7 @@ start_dbus_proxy (FlatpakBwrap *app_bwrap,
|
||||
g_autofree char *commandline = NULL;
|
||||
g_autoptr(FlatpakBwrap) proxy_bwrap = NULL;
|
||||
int sync_fds[2] = {-1, -1};
|
||||
int proxy_start_index;
|
||||
|
||||
proxy_bwrap = flatpak_bwrap_new (NULL);
|
||||
|
||||
@@ -742,6 +743,8 @@ start_dbus_proxy (FlatpakBwrap *app_bwrap,
|
||||
|
||||
flatpak_bwrap_add_arg (proxy_bwrap, proxy);
|
||||
|
||||
proxy_start_index = proxy_bwrap->argv->len;
|
||||
|
||||
if (pipe (sync_fds) < 0)
|
||||
{
|
||||
g_set_error_literal (error, G_IO_ERROR, g_io_error_from_errno (errno),
|
||||
@@ -759,6 +762,9 @@ start_dbus_proxy (FlatpakBwrap *app_bwrap,
|
||||
/* Note: This steals the fds from proxy_arg_bwrap */
|
||||
flatpak_bwrap_append_bwrap (proxy_bwrap, proxy_arg_bwrap);
|
||||
|
||||
if (!flatpak_bwrap_bundle_args (proxy_bwrap, proxy_start_index, -1, TRUE, error))
|
||||
return FALSE;
|
||||
|
||||
flatpak_bwrap_finish (proxy_bwrap);
|
||||
|
||||
commandline = flatpak_quote_argv ((const char **) proxy_bwrap->argv->pdata, -1);
|
||||
|
||||
Reference in New Issue
Block a user