Add sys_clone, add hello world example

This commit is contained in:
Pragyansh Chaturvedi
2025-09-03 01:11:13 +05:30
parent 0d026c5399
commit 0a4d5ea4f9
2 changed files with 12 additions and 0 deletions

11
examples/hello_world.py Normal file
View File

@ -0,0 +1,11 @@
from pythonbpf.decorators import tracepoint, syscalls
from ctypes import c_void_p, c_int32
@tracepoint(syscalls.sys_clone)
def trace_clone(ctx: c_void_p) -> c_int32:
print("Hello, World!")
return c_int32(0)
LICENSE = "GPL"