Troubles with calling kern_execve from kthread_create

botcser

New Member


Messages: 2

Hello, Everyone.

I'm loading kernel module by kldload(8)...
I'm trying to call kern_execve() from kthread_create(): if I call kern_execve() directly from start() - everything works fine, but if I call kthread_create() from start() and then call kern_execve() from the created child - I'm getting the following error
Code:
errno 2 "No such file or directory"
Why do I get this error? ;)

Or, how do I execute a binary file from loading kernel module, while loading parallel and not wait until this binary will finish his work
 
Last edited:
OP
OP
B

botcser

New Member


Messages: 2

Get from reverse:
Code:
curthread->td_proc->p_fd->fd_cdir ?= 0 -> return errno 2
And for what this check...
 
Top