Code executed using load()() cannot access functions from its caller

92 Views Asked by At

So I am writing and testing my new OS kernel and just finished the part where it loads up /bin/init.lua, I tested it, it loads up init.lua, andddd it exit mid-execution. I have a function in init.lua where it prints out test message, but it need to access two specific function from the kernel but it cannot seem to access it. Any idea how to make a code executed by load()() be able to access functions from its caller?

Just in case you need to see the source code: https://github.com/WattanaGaming/OCLinux/blob/master/boot/kernel/OCLinux.lua#L86

0

There are 0 best solutions below