Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
weston
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sichem
weston
Commits
325390e5
Commit
325390e5
authored
Oct 09, 2013
by
Kristian H. Kristensen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
launcher: Don't leak tty file descriptor on launcher destroy
parent
8ac6a2da
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
src/launcher-util.c
src/launcher-util.c
+6
-1
No files found.
src/launcher-util.c
View file @
325390e5
...
...
@@ -256,7 +256,11 @@ setup_tty(struct weston_launcher *launcher, int tty)
int
ret
,
kd_mode
;
if
(
tty
==
0
)
{
launcher
->
tty
=
tty
;
launcher
->
tty
=
dup
(
tty
);
if
(
launcher
->
tty
==
-
1
)
{
weston_log
(
"couldn't dup stdin: %m
\n
"
);
return
-
1
;
}
}
else
{
snprintf
(
tty_device
,
sizeof
tty_device
,
"/dev/tty%d"
,
tty
);
launcher
->
tty
=
open
(
tty_device
,
O_RDWR
|
O_CLOEXEC
);
...
...
@@ -379,5 +383,6 @@ weston_launcher_destroy(struct weston_launcher *launcher)
wl_event_source_remove
(
launcher
->
vt_source
);
}
close
(
launcher
->
tty
);
free
(
launcher
);
}
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