Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <fcntl.h> /* For O_* constants */
- #include <sys/stat.h> /* For mode constants */
- #include <semaphore.h>
- #include <iostream>
- #include <cstdlib>
- #include <cstring>
- #include <cerrno>
- #include "nombres.h"
- using namespace std;
- int
- main(void) {
- for (int i = 0; i < nSEM; ++i) {
- if (sem_unlink(nombres[i]) == -1) {
- cerr << "Error borrando los semaforos: " << strerror(errno) << endl;
- }
- }
- return EXIT_SUCCESS;
- }
Advertisement
Add Comment
Please, Sign In to add comment