1 /* gspawn.c - Process launching
3 * Copyright 2000 Red Hat, Inc.
4 * g_execvpe implementation based on GNU libc execvp:
5 * Copyright 1991, 92, 95, 96, 97, 98, 99 Free Software Foundation, Inc.
7 * SPDX-License-Identifier: LGPL-2.1-or-later
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public
11 * License as published by the Free Software Foundation; either
12 * version 2.1 of the License, or (at your option) any later version.
14 * This library is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Lesser General Public License for more details.
19 * You should have received a copy of the GNU Lesser General Public License
20 * along with this library; if not, see <http://www.gnu.org/licenses/>.
30 _g_spawn_exec_err_to_g_error (gint en)
36 return G_SPAWN_ERROR_ACCES;
41 return G_SPAWN_ERROR_PERM;
46 return G_SPAWN_ERROR_TOO_BIG;
51 return G_SPAWN_ERROR_NOEXEC;
56 return G_SPAWN_ERROR_NAMETOOLONG;
61 return G_SPAWN_ERROR_NOENT;
66 return G_SPAWN_ERROR_NOMEM;
71 return G_SPAWN_ERROR_NOTDIR;
76 return G_SPAWN_ERROR_LOOP;
81 return G_SPAWN_ERROR_TXTBUSY;
86 return G_SPAWN_ERROR_IO;
91 return G_SPAWN_ERROR_NFILE;
96 return G_SPAWN_ERROR_MFILE;
101 return G_SPAWN_ERROR_INVAL;
106 return G_SPAWN_ERROR_ISDIR;
111 return G_SPAWN_ERROR_LIBBAD;
115 return G_SPAWN_ERROR_FAILED;