networkAgent: Restore the NOFILE limit
Restore the original NOFILE limit prior to spawn the VPN helper. Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2117>
This commit is contained in:
parent
8d8eba000f
commit
7c394b0512
@ -389,11 +389,17 @@ var VPNRequestHandler = class {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
let [success_, pid, stdin, stdout, stderr] =
|
let [success_, pid, stdin, stdout, stderr] =
|
||||||
GLib.spawn_async_with_pipes(null, /* pwd */
|
GLib.spawn_async_with_pipes(
|
||||||
argv,
|
null, /* pwd */
|
||||||
null, /* envp */
|
argv,
|
||||||
GLib.SpawnFlags.DO_NOT_REAP_CHILD,
|
null, /* envp */
|
||||||
null /* child_setup */);
|
GLib.SpawnFlags.DO_NOT_REAP_CHILD,
|
||||||
|
() => {
|
||||||
|
try {
|
||||||
|
global.context.restore_rlimit_nofile();
|
||||||
|
} catch (err) {
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
this._childPid = pid;
|
this._childPid = pid;
|
||||||
this._stdin = new Gio.UnixOutputStream({ fd: stdin, close_fd: true });
|
this._stdin = new Gio.UnixOutputStream({ fd: stdin, close_fd: true });
|
||||||
|
Loading…
x
Reference in New Issue
Block a user