I thought that every SYSTEM CALL returned -1 on error. For example, read returns -1 if you give it a fid that hasn't been opened, is not readable etc. EOF is NOT considered an error, and is signalled by a 0 return. Thus SHMOP returning -1 on an error would be consistent with all other system calls.