ssdd: change the written pid

During debugging it turned out to be helpful to see the parent pid
and mostly the two tasks interact with each other: the tracer and
tracee.
Add this information it can searched for it.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: John Kacur <jkacur@redhat.com>
This commit is contained in:
Sebastian Andrzej Siewior 2019-01-15 11:32:26 +01:00 committed by John Kacur
parent b9f812a0c4
commit 153c8171e0
1 changed files with 3 additions and 1 deletions

View File

@ -144,7 +144,6 @@ static int forktests(int testid)
struct sigaction act, oact;
parent = getpid();
printf("forktest#%d/%d: STARTING\n", testid, parent);
child = fork();
if (child == -1) {
@ -155,6 +154,8 @@ static int forktests(int testid)
if (!child)
child_process();
printf("forktest#%d/%d/%d: STARTING\n", testid, parent, child);
act.sa_sigaction = sigchld;
sigemptyset(&act.sa_mask);
act.sa_flags = SA_SIGINFO;
@ -275,6 +276,7 @@ int main(int argc, char **argv)
if (argc)
nsteps = atoi(*argv);
}
printf("#main : %d\n", getpid());
printf("#forks: %d\n", nforks);
printf("#steps: %d\n", nsteps);
printf("\n");