|
Some system calls are operating system dependent
Some system calls are even operation system revision dependent
Linux 2.4 changed some system calls from Linux 2.2
glibc hides much of this
Padding and alignment of C structures is machine wordsize dependent:
For example, a structure containing a short and an int might be aligned as:
[ 8 bits ] [ 8 bits ] [ 8 bits ] [ 8 bits ] short two bytes padding int
Alternatives may prove to be more reliable
Under Linux, /proc is a wonderful resource
Perl XS wrappers, if you're willing to forgo pure Perl
Even so, syscall can be a useful tool in your toolbox