global cleanup to use the new syscall interface