delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
DomainKey-Signature: | a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id |
:list-unsubscribe:list-subscribe:list-archive:list-post | |
:list-help:sender:subject:to:references:from:message-id:date | |
:mime-version:in-reply-to:content-type | |
:content-transfer-encoding; q=dns; s=default; b=MftIwmGgRMNu/9dC | |
wHTh0225kUS7hRguZdXpXOMkvQr98bOQZRG5Z7iJPY5j63DdxDtNU47qvXrOp2TE | |
E4jQ4YRpWrDkWvcTBE7Sr4EhIetHAV7N9aA9udcD18Ce4qS4gLmzpGh9RKPhYY3w | |
2U8/eGKzvfisQJXSD+ZwRsuIENU= | |
DKIM-Signature: | v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id |
:list-unsubscribe:list-subscribe:list-archive:list-post | |
:list-help:sender:subject:to:references:from:message-id:date | |
:mime-version:in-reply-to:content-type | |
:content-transfer-encoding; s=default; bh=VRSqeEVm0O8bvYQQhuLStC | |
sLIGc=; b=RT3wm+pOrgGgZj94q2eMPyVkMJWPcCyfVUpgX75bADy+Yaej+ZGvXi | |
ZV4Dp2VLyuVTCEpJ9AiRctFDXivIsjX+c6VPB4W4vNPLcVQqL9pKF24SwI1AdsPy | |
PtexCdOl+uw90jhSSN3hCl1pBleEjK8IuAwJXAwW0FamiL5qIlsBw= | |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
Authentication-Results: | sourceware.org; auth=none |
X-Virus-Found: | No |
X-Spam-SWARE-Status: | No, score=-2.5 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 spammy= |
X-HELO: | limerock01.mail.cornell.edu |
X-CornellRouted: | This message has been Routed already. |
Subject: | Re: Cygwin IPC - ftok() returns negative values - Bug Report |
To: | cygwin AT cygwin DOT com |
References: | <AM3PR05MB3399758BC225C8E63BACF0FEB230 AT AM3PR05MB339 DOT eurprd05 DOT prod DOT outlook DOT com> <20160629151446 DOT GO981 AT calimero DOT vinschen DOT de> <DB3PR05MB3481DD1143D413B28B2EF1BEB230 AT DB3PR05MB348 DOT eurprd05 DOT prod DOT outlook DOT com> <f067d528-3262-ab8a-0681-a4f55ab5c365 AT gmail DOT com> <DB3PR05MB348D20C938474A90C6D8602EB230 AT DB3PR05MB348 DOT eurprd05 DOT prod DOT outlook DOT com> |
From: | Ken Brown <kbrown AT cornell DOT edu> |
Message-ID: | <1c8d0a60-1598-0546-2861-87bcf270bb90@cornell.edu> |
Date: | Wed, 29 Jun 2016 16:01:27 -0400 |
User-Agent: | Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 |
MIME-Version: | 1.0 |
In-Reply-To: | <DB3PR05MB348D20C938474A90C6D8602EB230@DB3PR05MB348.eurprd05.prod.outlook.com> |
X-PMX-Cornell-Gauge: | Gauge=XX |
X-IsSubscribed: | yes |
On 6/29/2016 3:20 PM, Stanisław Wawszczak wrote: >> On 29/06/2016 18:06, Stanisław Wawszczak wrote: > *Real question is why Cygwin's implementation of getsem() is not allowing to ask for more than nsems == 1?* > Here is stated, that the platform is limiting the nsems value: http://pubs.opengroup.org/onlinepubs/9699919799/functions/semget.html#tag_16_512 > This code is not working, return errno == 22 (EINVAL, I guess...) > #include <sys/ipc.h> > #include <sys/sem.h> > #include <stdio.h> > #include <errno.h> > > int main(int argc, char**argv) > { > int provs = 100; > key_t semHandle = ftok("/etc/fstab", 'A'); > int sfcbSem = -1; > printf("semHandle <= 0 ; (semHandle = %lld)\n", semHandle); > if ((sfcbSem = semget(semHandle, 2, IPC_CREAT | IPC_EXCL | 0600)) == -1) > { > printf("error semget, errno = %d\n", errno); > } > printf("finished\n"); > return 0; > } Do you have the cygserver service running? (See /usr/share/doc/Cygwin/cygserver.README.) Ken -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |