repo.or.cz
/
dragonfly.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
sys/vfs/hammer2: Use howmany() to calculate bulkfree bmap size
[dragonfly.git]
/
test
/
debug
/
sigtramp.c
blob
caf8032dcd86f6206bf61c0521375512c4f800b6
1
2
#include <stdio.h>
3
#include <stdlib.h>
4
#include <unistd.h>
5
#include <sys/sysctl.h>
6
#include <sys/kinfo.h>
7
8
int
9
main
(
int
ac
,
char
**
av
)
10
{
11
struct
kinfo_sigtramp tramp
;
12
int
mib
[
3
];
13
size_t
len
;
14
15
mib
[
0
] =
CTL_KERN
;
16
mib
[
1
] =
KERN_PROC
;
17
mib
[
2
] =
KERN_PROC_SIGTRAMP
;
18
19
len
=
sizeof
(
tramp
);
20
if
(
sysctl
(
mib
,
3
, &
tramp
, &
len
,
NULL
,
0
) <
0
) {
21
perror
(
"tramp"
);
22
exit
(
1
);
23
}
24
printf
(
"TRAMP: %016jx-%016jx
\n
"
,
25
tramp
.
ksigtramp_start
,
26
tramp
.
ksigtramp_end
);
27
return
0
;
28
}