flags must include read,write,execute permission.
for examples:
semget( 3333, 1, IPC_CREAT | IPC_EXCL | 0666 );
if there is not a '0666', then 'semop' wait will succed always.