Browse code

*** empty log message ***

Andrei Pelinescu-Onciul authored on 31/01/2002 21:23:25
Showing 1 changed files
... ...
@@ -135,7 +135,8 @@ static int init_semaphore_set( int size )
135 135
 
136 136
 	new_semaphore=semget ( IPC_PRIVATE, size, IPC_CREAT | IPC_PERMISSIONS );
137 137
 	if (new_semaphore==-1) {
138
-		DBG("DEBUG: init_semaphore_set:  failure to allocate a semaphore\n");
138
+		LOG(L_CRIT, "ERROR: init_semaphore_set:  failure to allocate a"
139
+					" semaphore: %s\n", strerror(errno));
139 140
 		return -1;
140 141
 	}
141 142
 	for (i=0; i<size; i++) {
... ...
@@ -147,9 +148,11 @@ static int init_semaphore_set( int size )
147 148
                 /* binary lock */
148 149
                 argument.val = +1;
149 150
                 if (semctl( new_semaphore, i , SETVAL , argument )==-1) {
150
-			DBG("DEBUG: init_semaphore_set:  failure to initialize a semaphore\n");
151
+			LOG(L_CRIT, "ERROR: init_semaphore_set:  failure to "
152
+						"initialize a semaphore: %s\n", strerror(errno));
151 153
 			if (semctl( entry_semaphore, 0 , IPC_RMID , 0 )==-1)
152
-				DBG("DEBUG: init_semaphore_set:  failure to release a semaphore\n");
154
+				DBG("DEBUG: init_semaphore_set:  failure to release"
155
+						" a semaphore\n");
153 156
 			return -2;
154 157
                 }
155 158
         }