Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
ccan
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
mirror
ccan
Commits
30d3e635
Commit
30d3e635
authored
Jun 29, 2008
by
Rusty Russell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fork support.
parent
6502a872
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
ccan/tap/tap.c
ccan/tap/tap.c
+6
-0
No files found.
ccan/tap/tap.c
View file @
30d3e635
...
...
@@ -28,6 +28,7 @@
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include "tap.h"
...
...
@@ -41,6 +42,7 @@ static char *todo_msg = NULL;
static
char
*
todo_msg_fixed
=
"libtap malloc issue"
;
static
int
todo
=
0
;
static
int
test_died
=
0
;
static
int
test_pid
;
/* Encapsulate the pthread code in a conditional. In the absence of
libpthread the code does nothing */
...
...
@@ -185,6 +187,9 @@ _gen_result(int ok, const char *func, char *file, unsigned int line,
static
void
_cleanup
(
void
)
{
/* If we forked, don't do cleanup in child! */
if
(
getpid
()
!=
test_pid
)
return
;
LOCK
;
...
...
@@ -245,6 +250,7 @@ _tap_init(void)
static
int
run_once
=
0
;
if
(
!
run_once
)
{
test_pid
=
getpid
();
atexit
(
_cleanup
);
/* stdout needs to be unbuffered so that the output appears
...
...
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