Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
a4fc7360
Commit
a4fc7360
authored
Mar 20, 1993
by
Jim Blandy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* xterm.c (x_term_init): If the X connection is already in file
descriptor zero, don't dup it and close the old one.
parent
055e9517
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
src/xterm.c
src/xterm.c
+9
-6
No files found.
src/xterm.c
View file @
a4fc7360
...
...
@@ -4557,17 +4557,20 @@ x_term_init (display_name)
x_watch_cut_buffer_cache ();
#endif
dup2
(
ConnectionNumber
(
x_current_display
),
0
);
if
(
ConnectionNumber
(
x_current_display
)
!=
0
)
{
dup2
(
ConnectionNumber
(
x_current_display
),
0
);
#ifndef SYSV_STREAMS
/* Streams somehow keeps track of which descriptor number
is being used to talk to X. So it is not safe to substitute
descriptor 0. But it is safe to make descriptor 0 a copy of it. */
close
(
ConnectionNumber
(
x_current_display
));
ConnectionNumber
(
x_current_display
)
=
0
;
/* Looks a little strange?
/* Streams somehow keeps track of which descriptor number
is being used to talk to X. So it is not safe to substitute
descriptor 0. But it is safe to make descriptor 0 a copy of it. */
close
(
ConnectionNumber
(
x_current_display
));
ConnectionNumber
(
x_current_display
)
=
0
;
/* Looks a little strange?
* check the def of the macro;
* it is a genuine lvalue */
#endif
/* SYSV_STREAMS */
}
#endif
/* ! defined (HAVE_X11) */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment