[glib/wip/pwithnall/freebsd-spawn-fix] WIP
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/wip/pwithnall/freebsd-spawn-fix] WIP
- Date: Tue, 16 Feb 2021 15:00:30 +0000 (UTC)
commit c7510ab108690b360e82b2a4d559eaa53ae21eea
Author: Philip Withnall <pwithnall endlessos org>
Date: Tue Feb 16 15:00:23 2021 +0000
WIP
Signed-off-by: Philip Withnall <pwithnall endlessos org>
glib/gspawn.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/glib/gspawn.c b/glib/gspawn.c
index e185bfb9b..9fbe173a7 100644
--- a/glib/gspawn.c
+++ b/glib/gspawn.c
@@ -2555,12 +2555,15 @@ g_execute (const gchar *file,
if (search_path == NULL || strchr (file, '/') != NULL)
{
+ int errsv;
/* Don't search when it contains a slash. */
if (envp)
execve (file, argv, envp);
else
execv (file, argv);
- g_message ("exec of %s failed: %d", file, errno);
+ errsv = errno;
+ g_message ("exec of %s failed: %d, %s", file, errsv, strerror (errsv));
+ errno = errsv;
if (errno == ENOEXEC &&
!script_execute (file, argv, argv_buffer, argv_buffer_len, envp))
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]