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
5498ed17
Commit
5498ed17
authored
Sep 27, 2011
by
Cyrill Gorcunov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
restore: Use close_safe for pipes
Signed-off-by:
Cyrill Gorcunov
<
gorcunov@gmail.com
>
parent
9212f2e8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
cr-restore.c
cr-restore.c
+4
-4
No files found.
cr-restore.c
View file @
5498ed17
...
...
@@ -864,11 +864,11 @@ static int create_pipe(int pid, struct pipe_entry *e, struct pipe_info *pi, int
pr_info
(
"
\t
%d: All is ok - reopening pipe for %d
\n
"
,
pid
,
e
->
fd
);
if
(
e
->
flags
&
O_WRONLY
)
{
close
(
pfd
[
0
]
);
tmp
=
reopen_fd_as
(
e
->
fd
,
p
fd
[
1
]
);
close
_safe
(
&
pi
->
read_fd
);
tmp
=
reopen_fd_as
(
e
->
fd
,
p
i
->
write_fd
);
}
else
{
close
(
pfd
[
1
]
);
tmp
=
reopen_fd_as
(
e
->
fd
,
p
fd
[
0
]
);
close
_safe
(
&
pi
->
write_fd
);
tmp
=
reopen_fd_as
(
e
->
fd
,
p
i
->
read_fd
);
}
if
(
tmp
<
0
)
...
...
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