From: s g <hq9...@ma...> - 2009-01-19 09:54:03
|
Hi guys, In procedure Bool VmCheck_IsVirtualWorld(void) We have this logic for check virtuality in POSIX OSes (extract comes below). The first question is: what aspect of Virtualization does it test? Something about signals? The second question is: why can't we limit ourselves to only checking the Vmware version by VmCheck_GetVersion and exit if it returns false? Many thanks! ========== int signals[] = { SIGSEGV, }; struct sigaction olds[ARRAYSIZE(signals)]; if (Signal_SetGroupHandler(signals, olds, ARRAYSIZE(signals), VmCheckSegvHandler) == 0) { exit(1); } if (sigsetjmp(jmpBuf, TRUE) == 0) { jmpIsSet = TRUE; VmCheck_GetVersion(&version, &dummy); } else { jmpIsSet = FALSE; return FALSE; } if (Signal_ResetGroupHandler(signals, olds, ARRAYSIZE(signals)) == 0) { exit(1); } ========== |