
13 Dec
2005
13 Dec
'05
12:18 p.m.
My Linux man page says that sigaction is a *system* call, and I would guess that it's the same on most Unixes -- indeed a quick google seems to indicate that this is also the case for SunOS/Solaris (at least the function is listed in the "system calls" section). System calls can be hideously expensive compared to regular C library function calls depending on architecture.
Sigaction is definitely a syscall on most unices. While syscalls are not that expensive, at least on linux (i've done some benchmarks of null syscalls, and the cost of sigaction is almost the same of a null syscall), doing as less syscalls as possible is certanly a win.