</x-tad-smaller>
<x-tad-smaller> if ((MMgt_MMap = open ("/dev/zero", O_RDWR)) < 0) {
if ((MMgt_MMap = open ("/dev/null", O_RDWR)) < 0){
MMgt_MMap = 0;
}
}
</x-tad-smaller>
I'm pretty sure OS X doesn't allow this operation. Is there anyway around this problem?
That code is perfectly fine, except that if both of the above fail (for some reason that probably
should never happen) it will set MMgt_MMap to the standard input, which is probably not the
desired result. It should work correctly (at least from what I can see) if you change the line
"MMgt_MMap = 0;" to be "MMgt_MMap = -1;" instead.
Cheers,
Kyle Moffett
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GCM/CS/IT/U d- s++: a17 C++++>$ UB/L/X/*++++(+)>$ P+++(++++)>$
L++++(+++) E W++(+) N+++(++) o? K? w--- O? M++ V? PS+() PE+(-) Y+
PGP+++ t+(+++) 5 X R? tv-(--) b++++(++) DI+ D+ G e->++++$ h!*()>++$ r !y?(-)
------END GEEK CODE BLOCK------
