[LCP]Daemons and syscalls

Keith Schincke kschin at unf.edu
Thu Sep 13 05:33:09 UTC 2001


> a) How do you create daemons?

As an idea they are pretty easy:

	fork()
	if error
		print error and quit
	if parent
		exit
	if child
		close stdin/stdout/stderr


> b) Can we design a system call which will call the
> modules that we created?

I have written kernel modules that would register their functions in the
syscall table and replace and existing one. (wrapper around open, getdents
and so on). Just have to remember to save the address of the original
syscall so that yours can call it and restore it when your module unloads.


-- 
Keith Schincke           My dawg is always with me.
Jacksonville, Fl               00 Spool - Wild at Heart
http://www.unf.edu/~kschin                           Email: kschin at unf.edu
++The opinions in my email are mine only and are not those of my employer++

A RAM is a terrible thing to waste.






More information about the linuxCprogramming mailing list