Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 148189 Details for
Bug 228720
"GNOME" Terminal" regression after "vte" update when using "csh"
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Improved patch that solves "TERM" variable issue
replace-env-bz228720.patch (text/plain), 2.03 KB, created by
Joachim Frieben
on 2007-02-16 12:38:08 UTC
(
hide
)
Description:
Improved patch that solves "TERM" variable issue
Filename:
MIME Type:
Creator:
Joachim Frieben
Created:
2007-02-16 12:38:08 UTC
Size:
2.03 KB
patch
obsolete
>--- src/pty.c.replace-env-bz228720.patch >+++ src/pty.c >@@ -265,6 +265,49 @@ > * - additional user callback for child setup > */ > >+static void >+collect_variables (char *name, char *value, GPtrArray *array) >+{ >+ g_ptr_array_add (array, >+ g_strconcat (name, "=", value, NULL)); >+} >+ >+static gchar ** >+merge_environ (char **envp) >+{ >+ GHashTable *table; >+ GPtrArray *array; >+ gint i; >+ >+ table = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free); >+ for (i = 0; environ[i] != NULL; i++) { >+ gchar *name = g_strdup (environ[i]); >+ gchar *value = strchr (name, '='); >+ if (value) { >+ *value = '\0'; >+ value = g_strdup (value + 1); >+ } >+ g_hash_table_replace (table, name, value); >+ } >+ if (envp != NULL) { >+ for (i = 0; envp[i] != NULL; i++) { >+ gchar *name = g_strdup (envp[i]); >+ gchar *value = strchr (name, '='); >+ if (value) { >+ *value = '\0'; >+ value = g_strdup (value + 1); >+ } >+ g_hash_table_replace (table, name, value); >+ } >+ } >+ >+ array = g_ptr_array_sized_new (g_hash_table_size (table) + 1); >+ g_hash_table_foreach (table, (GHFunc) collect_variables, array); >+ g_hash_table_destroy (table); >+ g_ptr_array_add (array, NULL); >+ return (gchar **)g_ptr_array_free (array, FALSE); >+} >+ > /* Run the given command (if specified) */ > static gboolean > _vte_pty_run_on_pty (struct vte_pty_child_setup_data *data, >@@ -277,7 +320,7 @@ > > if (command != NULL) { > gchar **arg2, **envp2; >- gint i, k, argc; >+ gint i, argc; > > /* push the command into argv[0] */ > argc = argv ? g_strv_length (argv) : 0; >@@ -289,17 +332,7 @@ > arg2[i+1] = NULL; > > /* add the given environment to the childs */ >- i = g_strv_length (environ) + (envp ? g_strv_length (envp) : 0); >- envp2 = g_new (char *, i + 1); >- for (i = 0; environ[i] != NULL; i++) { >- envp2[i] = g_strdup (environ[i]); >- } >- if (envp != NULL) { >- for (k = 0; envp[k] != NULL; k++) { >- envp2[i++] = g_strdup (envp[k]); >- } >- } >- envp2[i] = NULL; >+ envp2 = merge_environ (envp); > > _VTE_DEBUG_IF (VTE_DEBUG_MISC) { > g_printerr ("Spawing command '%s'\n", command);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 228720
:
148178
| 148189