# Intercepting system calls



## JSR COUT (Apr 4, 2001)

Anybody know if it's posible to trap a system call under OSX?  We have that ability with Mac OS9, 8, 7 ...  I am only interested in trapping OSX toolbox routines, not normal unix system calls..


----------



## strobe (Apr 5, 2001)

The only 'traps' are in the kernel which is definitely not what you're looking for.

If you want to replace library functions you'll have to use DYLD_LIBRARY_INSERT and compile a custom library which replaces the specific 'modules'

man -k dyld


----------



## JSR COUT (Apr 5, 2001)

Cool, thanks


----------



## strobe (Apr 5, 2001)

If you succeed let me know, I haven't used this facility and haven't seen any code which does yet.


----------

