|
News,
Internal,
Projects,
Home Software, Support, Documentation |
|
> .... > sem_t *mutex; > /* mutex = sem_open (SEM_NAME, O_CREAT | O_EXCL, FILE_MODE, 1); */ > /* mutex = sem_open (SEM_NAME, O_CREAT | O_EXCL); */ > mutex = sem_open (SEM_NAME, O_CREAT); > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > POSIX sem_open(3)을 살펴보세요. > O_CREAT Create the semaphore if it does not already exist. > The third argument to the call to sem_open() must be of type > mode_t and specifies the mode for the semaphore. Only the > S_IWUSR, S_IWGRP, and S_IWOTH bits are examined; it is not pos- > sible to grant only ``read'' permission on a semaphore. The > mode is modified according to the process's file creation mask; > see umask(2). > The fourth argument must be an unsigned int and specifies the > initial value for the semaphore, and must be no greater than > SEM_VALUE_MAX. > if ( mutex == SEM_FAILED ) > .... 네, 제가 미처 그 부분을 읽지를 못했습니다. 그런데 그렇게 변경을 하고 해봐도 결과는 같게 나오더군요. ( mutex = sem_open ("/tmp/mysem", O_CREAT, S_IWUSR, 1); ) 혹시 위 소스를 컴파일 해 보신 다른 분들은 되시나요? ____________________________________________________________________________
|
_______________________________________________ 한국 FreeBSD 사용자 그룹(KFUG) questions 메일링 리스트 questions at kr.FreeBSD.org http://www.kr.FreeBSD.org/mailman/listinfo/questions
|
Copyright © 1998-2005 Korea FreeBSD Users Group. All rights reserved. webmaster at kr.FreeBSD.org $Date: 2004/05/18 16:01:25 $ |
|