|
[Dbworld] SDM 2005: Call for Papers & Workshop/Tutorial Proposals: msg#00069db.dbworld
#include <sys/types.h> #include <sys/ipc.h> #include <sys/sem.h> #include <stdio.h> union semun { int val; struct semid_ds *buf; ushort *array; }; main() { int semId; union semun semun; key_t key = IPC_PRIVATE; semId = semget(key, 0, 0); if (semId < 0) { printf("Can't create a semaphore\n"); perror("semget"); exit(-1); } printf("sleeping...\n"); sleep(10); printf("Remove semaphore id %d\n", semId); semctl(semId, 0, IPC_RMID, semun); } _______________________________________________ Please do not post msgs that are not relevant to the database community at large. Go to www.cs.wisc.edu/dbworld for guidelines and posting forms. To unsubscribe, go to http://lists.cs.wisc.edu/mailman/listinfo/dbworld |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | [Dbworld] CFP(in french): S.I. et e-administration: 00069, Saïd ASSAR |
|---|---|
| Next by Date: | [Dbworld] MobiCom Student Posters Session: 00069, Stefano Basagni |
| Previous by Thread: | [Dbworld] CFP(in french): S.I. et e-administrationi: 00069, Saïd ASSAR |
| Next by Thread: | [Dbworld] MobiCom Student Posters Session: 00069, Stefano Basagni |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |