On 01/03/2011 05:30 PM, Sunil Mushran wrote: > >> + semid = semget(O2HB_SEM_MAGIC_KEY, 1, 0); >> + if (semid< 0) >> + return 0; >> + if (semop(semid, trylock, 1)< 0) >> + return 1; BTW, please add spaces around <. + if (semop(semid, trylock, 1)< 0)