elextr commented on this pull request.
@@ -675,6 +682,45 @@ const gchar *vte_get_working_directory(void)
g_free(cwd); } } + else + { + gint status = 0; + gchar *stdout = NULL; + gchar *pid_str = g_strdup_printf("%d", pid); + gchar *argv[] = {"lsof", "-a", "-d", "cwd", "-F", "n", "-p", pid_str, NULL};
Note the `exec` family of system calls takes `char* const argv[]` so `g_spawn` is looser than needed.