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:
parent
b9f812a0c4
commit
153c8171e0
|
@ -144,7 +144,6 @@ static int forktests(int testid)
|
||||||
struct sigaction act, oact;
|
struct sigaction act, oact;
|
||||||
|
|
||||||
parent = getpid();
|
parent = getpid();
|
||||||
printf("forktest#%d/%d: STARTING\n", testid, parent);
|
|
||||||
|
|
||||||
child = fork();
|
child = fork();
|
||||||
if (child == -1) {
|
if (child == -1) {
|
||||||
|
@ -155,6 +154,8 @@ static int forktests(int testid)
|
||||||
if (!child)
|
if (!child)
|
||||||
child_process();
|
child_process();
|
||||||
|
|
||||||
|
printf("forktest#%d/%d/%d: STARTING\n", testid, parent, child);
|
||||||
|
|
||||||
act.sa_sigaction = sigchld;
|
act.sa_sigaction = sigchld;
|
||||||
sigemptyset(&act.sa_mask);
|
sigemptyset(&act.sa_mask);
|
||||||
act.sa_flags = SA_SIGINFO;
|
act.sa_flags = SA_SIGINFO;
|
||||||
|
@ -275,6 +276,7 @@ int main(int argc, char **argv)
|
||||||
if (argc)
|
if (argc)
|
||||||
nsteps = atoi(*argv);
|
nsteps = atoi(*argv);
|
||||||
}
|
}
|
||||||
|
printf("#main : %d\n", getpid());
|
||||||
printf("#forks: %d\n", nforks);
|
printf("#forks: %d\n", nforks);
|
||||||
printf("#steps: %d\n", nsteps);
|
printf("#steps: %d\n", nsteps);
|
||||||
printf("\n");
|
printf("\n");
|
||||||
|
|
Loading…
Reference in New Issue