K.Muthu kumaran wrote:

>  I hv a C program that creates a semaphore. But every time I run the
> program my semget returns me -1. The syntax I used for semget was
>    semget(SEMKEY,1, IPC_CREAT|0666);
>  I get the error message "No space left on device".  What should I do to
> provide enough space so that semget gets created sucessfully.

>From the semget(2) manpage:

       ENOSPC     A  semaphore set has to be created but the sys
                  tem limit for the maximum number  of  semaphore
                  sets  (SEMMNI), or the system wide maximum num
                  ber of semaphores (SEMMNS), would be  exceeded.

IOW, you've used up all available semaphores. Use ipcs to check that
this is the case.

Note that IPC structures are persistent; they aren't automatically
deleted when the process terminates. If your program doesn't delete
them, they will accumulate.

-- 
Glynn Clements <[EMAIL PROTECTED]>

Reply via email to