#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;
}
Comments