nginx-1.0.2

Denis F. Latypoff latypoff yandex.ru
10 18:59:18 MSD 2011



10.05.2011, 21:38, "Igor Sysoev" <igor at sysoev.ru>:
> On Tue, May 10, 2011 at 09:12:19PM +0700, Denis F. Latypoff wrote:
>
>> 10.05.2011, 19:29, "Igor Sysoev" <igor at sysoev.ru>;:
>>>   nginx 1.0.2 10.05.2011
>>>
>>> *) :        POSIX.
>>  centos   libpthread.
>>
>> [root at gostats nginx-1.0.2]# cat sem.c
>> #include <semaphore.h>
>> int
>> main (void)
>> {
>> sem_t sem;
>> if (sem_init(&sem, 1, 0) == -1)
>> return 1;
>> sem_destroy(&sem);
>> return 0;
>> }
>> [root at gostats nginx-1.0.2]# gcc sem.c
>> /tmp/ccMUxgLl.o: In function `main':
>> sem.c:(.text+0x17): undefined reference to `sem_init'
>> sem.c:(.text+0x2e): undefined reference to `sem_destroy'
>> collect2: ld returned 1 exit status
>> [root at gostats nginx-1.0.2]# gcc -lpthread sem.c
>> [root at gostats nginx-1.0.2]# ./a.out && echo $?
>> 0
>
>   
> http://www.kernel.org/doc/man-pages/online/pages/man3/sem_init.3.html
>  -rt  .   ?

, .     -  .
  -    , 
        _.

-- 
br, Denis F. Latypoff.



nginx-ru