All pastes #1337545 Raw Edit

Untitled

public c v1 · immutable
#1337545 ·published 2009-02-15 00:01 UTC
rendered paste body
#include <sys/types.h>#include <errno.h>#include <fcntl.h>#include <semaphore.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include <unistd.h> int main(void){	sem_t *sem1;	sem1 = sem_open("nimeni", O_CREAT | O_EXCL, 0666, 1);	if (sem1 == NULL) {		printf("error opening semaphore: %s\n", strerror(errno));		return EXIT_FAILURE;	}	return EXIT_SUCCESS;}