Syscalls in strace
-
29-10-2019 - |
Frage
I called strace
on some program A
which forks two child programs: B
and C
.
In strace
, I have the following syscalls
:
pipe[([3,4]) = 0
pipe([5,6]) = 0
fork(wc) = 7135
fork (gnetcat) = 7136
close(3) = 0
close(5) = 0
close(4) = 0
close(6) = 0
wait4(-1, NULL, 0, NULL) = 7136
wait4(-1, NUKLL, 0, NULL) = 7135
I am trying to rewrite the program A
in C. In that case, I really never really have to know what those file descriptors 3
,4
,5
and 6
stand for, do I? Is there a way to find out what they are? I know 3
is for stderr
.
Keine korrekte Lösung
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow