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
25ef4199
Commit
25ef4199
authored
Mar 27, 2013
by
Pavel Emelyanov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tty: More descriptive log message about --shell-job requirement
Signed-off-by:
Pavel Emelyanov
<
xemul@parallels.com
>
parent
f16d7c64
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
7 deletions
+10
-7
crtools.c
crtools.c
+3
-2
tty.h
include/tty.h
+2
-0
pstree.c
pstree.c
+3
-3
tty.c
tty.c
+2
-2
No files found.
crtools.c
View file @
25ef4199
...
@@ -27,6 +27,7 @@
...
@@ -27,6 +27,7 @@
#include "net.h"
#include "net.h"
#include "version.h"
#include "version.h"
#include "page-xfer.h"
#include "page-xfer.h"
#include "tty.h"
struct
cr_options
opts
;
struct
cr_options
opts
;
...
@@ -105,7 +106,7 @@ int main(int argc, char *argv[])
...
@@ -105,7 +106,7 @@ int main(int argc, char *argv[])
{
"veth-pair"
,
required_argument
,
0
,
47
},
{
"veth-pair"
,
required_argument
,
0
,
47
},
{
"action-script"
,
required_argument
,
0
,
49
},
{
"action-script"
,
required_argument
,
0
,
49
},
{
LREMAP_PARAM
,
no_argument
,
0
,
41
},
{
LREMAP_PARAM
,
no_argument
,
0
,
41
},
{
"shell-job"
,
no_argument
,
0
,
'j'
},
{
OPT_SHELL_JOB
,
no_argument
,
0
,
'j'
},
{
"file-locks"
,
no_argument
,
0
,
'l'
},
{
"file-locks"
,
no_argument
,
0
,
'l'
},
{
"page-server"
,
no_argument
,
0
,
50
},
{
"page-server"
,
no_argument
,
0
,
50
},
{
"address"
,
required_argument
,
0
,
51
},
{
"address"
,
required_argument
,
0
,
51
},
...
@@ -361,7 +362,7 @@ usage:
...
@@ -361,7 +362,7 @@ usage:
pr_msg
(
" The environment variable CRTOOL_SCRIPT_ACTION contains one of the actions:
\n
"
);
pr_msg
(
" The environment variable CRTOOL_SCRIPT_ACTION contains one of the actions:
\n
"
);
pr_msg
(
" * network-lock - lock network in a target network namespace
\n
"
);
pr_msg
(
" * network-lock - lock network in a target network namespace
\n
"
);
pr_msg
(
" * network-unlock - unlock network in a target network namespace
\n
"
);
pr_msg
(
" * network-unlock - unlock network in a target network namespace
\n
"
);
pr_msg
(
" -j|--
shell-job allow to dump and restore shell jobs
\n
"
);
pr_msg
(
" -j|--
%s allow to dump and restore shell jobs
\n
"
,
OPT_SHELL_JOB
);
pr_msg
(
" -l|--file-locks handle file locks, for safety, only used for container
\n
"
);
pr_msg
(
" -l|--file-locks handle file locks, for safety, only used for container
\n
"
);
pr_msg
(
"
\n
* Logging:
\n
"
);
pr_msg
(
"
\n
* Logging:
\n
"
);
...
...
include/tty.h
View file @
25ef4199
...
@@ -24,4 +24,6 @@ extern int tty_verify_active_pairs(void);
...
@@ -24,4 +24,6 @@ extern int tty_verify_active_pairs(void);
extern
int
tty_prep_fds
(
struct
cr_options
*
opts
);
extern
int
tty_prep_fds
(
struct
cr_options
*
opts
);
extern
void
tty_fini_fds
(
void
);
extern
void
tty_fini_fds
(
void
);
#define OPT_SHELL_JOB "shell-job"
#endif
/* __CR_TTY_H__ */
#endif
/* __CR_TTY_H__ */
pstree.c
View file @
25ef4199
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
#include "lock.h"
#include "lock.h"
#include "namespaces.h"
#include "namespaces.h"
#include "files.h"
#include "files.h"
#include "tty.h"
#include "asm/dump.h"
#include "asm/dump.h"
#include "protobuf.h"
#include "protobuf.h"
...
@@ -99,8 +99,8 @@ int dump_pstree(struct pstree_item *root_item)
...
@@ -99,8 +99,8 @@ int dump_pstree(struct pstree_item *root_item)
*/
*/
if
(
root_item
->
pid
.
virt
!=
root_item
->
sid
)
{
if
(
root_item
->
pid
.
virt
!=
root_item
->
sid
)
{
if
(
!
opts
.
shell_job
)
{
if
(
!
opts
.
shell_job
)
{
pr_err
(
"The root process %d is not a session leader
,
"
pr_err
(
"The root process %d is not a session leader
.
"
"
miss option?
\n
"
,
item
->
pid
.
virt
);
"
Consider using --"
OPT_SHELL_JOB
" option
\n
"
,
item
->
pid
.
virt
);
return
-
1
;
return
-
1
;
}
}
}
}
...
...
tty.c
View file @
25ef4199
...
@@ -1015,8 +1015,8 @@ int dump_verify_tty_sids(void)
...
@@ -1015,8 +1015,8 @@ int dump_verify_tty_sids(void)
if
(
!
item
||
item
->
pid
.
virt
!=
dinfo
->
sid
)
{
if
(
!
item
||
item
->
pid
.
virt
!=
dinfo
->
sid
)
{
if
(
!
opts
.
shell_job
)
{
if
(
!
opts
.
shell_job
)
{
pr_err
(
"Found sid %d pgid %d (%s) on peer fd %d. "
pr_err
(
"Found
dangling tty with
sid %d pgid %d (%s) on peer fd %d. "
"
Missing option?
\n
"
,
"
Consider using --"
OPT_SHELL_JOB
" option.
\n
"
,
dinfo
->
sid
,
dinfo
->
pgrp
,
dinfo
->
sid
,
dinfo
->
pgrp
,
tty_type
(
dinfo
->
major
),
tty_type
(
dinfo
->
major
),
dinfo
->
fd
);
dinfo
->
fd
);
...
...
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