Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
criu
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhul
criu
Commits
ff875dc4
Commit
ff875dc4
authored
Sep 14, 2012
by
Pavel Emelyanov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tty: Cleanup tty mutex preparation
Signed-off-by:
Pavel Emelyanov
<
xemul@parallels.com
>
parent
aa247d86
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
7 deletions
+7
-7
cr-restore.c
cr-restore.c
+5
-5
tty.h
include/tty.h
+1
-1
tty.c
tty.c
+1
-1
No files found.
cr-restore.c
View file @
ff875dc4
...
...
@@ -91,6 +91,10 @@ static int prepare_shared(void)
if
(
prepare_shared_fdinfo
())
return
-
1
;
if
(
prepare_shared_tty
())
return
-
1
;
if
(
collect_reg_files
())
return
-
1
;
...
...
@@ -145,12 +149,8 @@ static int prepare_shared(void)
goto
err
;
mark_pipe_master
();
ret
=
tty_setup_orphan_slavery
(
&
opts
);
if
(
ret
)
goto
err
;
ret
=
tty_prepare_shared
();
ret
=
tty_setup_orphan_slavery
(
&
opts
);
if
(
ret
)
goto
err
;
...
...
include/tty.h
View file @
ff875dc4
...
...
@@ -16,7 +16,7 @@
extern
int
dump_tty
(
struct
fd_parms
*
p
,
int
lfd
,
const
struct
cr_fdset
*
set
);
extern
int
collect_tty
(
void
);
extern
int
tty_is_master
(
struct
fdinfo_list_entry
*
le
);
extern
int
tty_prepare_shared
(
void
);
extern
int
prepare_shared_tty
(
void
);
extern
int
tty_setup_orphan_slavery
(
const
struct
cr_options
*
opts
);
#endif
/* CR_TTY_H__ */
tty.c
View file @
ff875dc4
...
...
@@ -104,7 +104,7 @@ static DECLARE_BITMAP(tty_bitmap, (MAX_TTYS << 1));
*/
static
mutex_t
*
tty_mutex
;
int
tty_prepare_shared
(
void
)
int
prepare_shared_tty
(
void
)
{
tty_mutex
=
shmalloc
(
sizeof
(
*
tty_mutex
));
if
(
!
tty_mutex
)
{
...
...
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