Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Message-ID: <20011128170550.78398.qmail@web11603.mail.yahoo.com> Date: Wed, 28 Nov 2001 09:05:50 -0800 (PST) From: Marcello Subject: semget and permission denied To: cygwin AT cygwin DOT com MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Hi, I am working with semaphores. When I try to get a semaphore, I use semget, but it returns me a value <0. The strerror is: Permission denied I tried in different ways, but it still doesn't work... Can you help me? -------------------------------------------------------------------- #include #include union semun { int val; struct semid_ds *buf; ushort * array; } argument; #include #include #include extern int errno; main() { key_t id; int c=19; if (( id=semget((key_t)ftok("./semabinit.c", c), 1, 0666 | IPC_CREAT))== -1) printf("strerror says open failed: %s\n", strerror( errno ) ); return(id); } ===== c:\>ptk __________________________________________________ __________________________________________________ Do You Yahoo!? Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month. http://geocities.yahoo.com/ps/info1 -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/