[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

sys_execve in apm.c



Hello,

I am trying to make my custom kernel go through standard shutdown
(/sbin/halt -p) when the power button is pressed (to invoke apm value
APM_SYS_STANDBY_RESUME). I have tried toying with the sys_execve function,
however cant seem to make it work properly.

Is there anywhere i can find a syntax document like a manual page on this
function? Ive tried searching, and it certainly does not appear to take the
same params as execve. I had quite a lengthy look at kern/init_main.c and
where it exec's init as its exit, there seems to be a lot of bloat
surrounding the use of this function.

Does anyone know of a manual page, a simple sample of code, or another way
for me to address this? What i thought to be decent code that i wrote for it
gave me loads and loads of compiler errors -- i guess im a little too new to
BSD kernel programming and used to having the luxury of a broader set of
functions.

Thanks,

Jason