At Thu, 27 Mar 2003 16:01:54 +1100, Andy Eager wrote: > Is it possible to test the accessability (rw or ro) of a memory region > before writing to it?
install a signal handler for SIGSEGV that longjmps to somewhere safe, and then just write. note that a strict reading of the specs says "all behaviour is undefined after returning from catching SIGSEGV". the only *right* answer of course, is Don't Do That. -- - Gus -- SLUG - Sydney Linux User's Group - http://slug.org.au/ More Info: http://lists.slug.org.au/listinfo/slug