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
321793cd
Commit
321793cd
authored
Nov 14, 2011
by
Cyrill Gorcunov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test: Add pipes output into testee
Signed-off-by:
Cyrill Gorcunov
<
gorcunov@gmail.com
>
parent
c9c2bddc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
testee.c
test/testee.c
+5
-1
No files found.
test/testee.c
View file @
321793cd
...
...
@@ -207,8 +207,10 @@ int main(int argc, char *argv[])
goto
err
;
if
(
child
==
0
)
{
printf
(
"first child pid: %d
\n
"
,
getpid
());
while
(
read
(
pipefd
[
0
],
&
buf
,
sizeof
(
buf
))
>
0
)
while
(
read
(
pipefd
[
0
],
&
buf
,
sizeof
(
buf
))
>
0
)
{
printf
(
"pipe-r: %8lx
\n
"
,
buf
);
sleep
(
3
);
}
*
(
unsigned
long
*
)
mmap_anon_sh
=
0x11111111
;
while
(
1
)
{
printf
(
"ping: %d
\n
"
,
getpid
());
...
...
@@ -219,6 +221,7 @@ int main(int argc, char *argv[])
printf
(
"first parent pid: %d
\n
"
,
getpid
());
// run_clone();
while
(
1
)
{
printf
(
"pipe-r: %8lx
\n
"
,
buf
);
printf
(
"ping: %d
\n
"
,
getpid
());
sleep
(
9
);
}
...
...
@@ -229,6 +232,7 @@ int main(int argc, char *argv[])
float
res
=
0
.
9
;
*
(
unsigned
long
*
)
mmap_anon_sh
=
0x33333333
;
printf
(
"ping: %d %f
\n
"
,
getpid
(),
res
+
(
float
)(
unsigned
long
)
mmap_anon_sh
);
printf
(
"pipe-w: %8lx
\n
"
,
buf
);
write
(
pipefd
[
1
],
&
buf
,
sizeof
(
buf
));
sleep
(
10
);
}
...
...
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