X-Recipient: archive-cygwin@delorie.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:date:from:to:subject:message-id:reply-to
	:references:mime-version:content-type:in-reply-to; q=dns; s=
	default; b=ndNPE/YeWZQ4XJE8D776UTIC7I2997ugWpbHgumJb68QNvhiIItvU
	uszFVNDgebZlaDrzsBctE++uliY2po+46BXm9X90hkDxB3f+5VuJb7wKrezKckVX
	yvew3JN664ToYwq4n33ycYHGnvQwOUmgETU9xqyFs6+cwb0Qsj6R7E=
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:date:from:to:subject:message-id:reply-to
	:references:mime-version:content-type:in-reply-to; s=default;
	 bh=2YKWZXC/T2uRX4ICl90ilgvMcsQ=; b=UiCkYRZA2JodlNxfAWjx7kysWpuA
	5R2q6qQHRSmhSArJnzm5LrvgCblej///gKazgDx7X90eWJgAyVGia7PBm5GP5q/Z
	wP8fS6mlX9VMek171ye8i1Z2ZDrhZG4EvMHkJAZz7kwrLaCLa0W93/gMPL+FMpaj
	6rJHIbvsXyPtpdI=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-0.3 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2
X-HELO: calimero.vinschen.de
Date: Tue, 17 Dec 2013 10:55:45 +0100
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: semget() API fails when run from CMD.exe but works from SH.exe
Message-ID: <20131217095545.GA9768@calimero.vinschen.de>
Reply-To: cygwin@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
References: <015701cef8cc$fb2f7010$f18e5030$@lbmsys.com> <20131216095623.GJ9487@calimero.vinschen.de> <02cd01cefa81$d6f13420$84d39c60$@lbmsys.com>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;	protocol="application/pgp-signature"; boundary="n8g4imXOkfNTN/H1"
Content-Disposition: inline
In-Reply-To: <02cd01cefa81$d6f13420$84d39c60$@lbmsys.com>
User-Agent: Mutt/1.5.21 (2010-09-15)

--n8g4imXOkfNTN/H1
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Please don't http://cygwin.com/acronyms/#TOFU

Thanks.

On Dec 16 12:11, Steven Bardwell wrote:
> OK -- I rewrote the test program using the POSIX IPC routine sem_open()
> and the program runs in SH.exe (and mintty.exe) but gives this message=20
> when run from a DOS box:
>=20
> Warning: '/dev/shm' does not exists or is not a directory.
>=20
> POSIX semaphores require the existance of this directory.
> Create the directory '/dev/shm' and set the permissions to 01777.
> For instance on the command line: mkdir -m 01777 /dev/shm

Yes, that's what I meant by writing "if you set up a matching environment."
Looks like you don't just run tools from CMD, you're trying to run the
tools outside of the Cygwin distro with its own Cygwin DLL.  If you do
that, you have to set up the environment around that DLL.  And you
should make sure to follow http://cygwin.com/licensing.html, should you
release your efforts to third parties.


Corinna


> Steve
> -------------------------------------------------------------------------=
----------------------
> On Dec 14 08:04, Steven Bardwell wrote:
> > I would like my Cygwin programs to work from a DOS (CMD.exe) window, bu=
t I
> > am
> > having problems with some API calls. Here is a simple program that trie=
s to
> > create
> > a semaphore =E2=80=93 it works fine when it is run from sh.exe (or in a=
 mintty
> > window), but
> > it crashes when run in a DOS window. (The Cygwin service is running.)
> >=20
> > Is there a way to make it work in both environments?
>=20
> That's not the intention of the IPC calls.  They usually only work
> if you set up a matching environment.
> [...]

--=20
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

--n8g4imXOkfNTN/H1
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.15 (GNU/Linux)

iQIcBAEBAgAGBQJSsB+hAAoJEPU2Bp2uRE+g2vwQAJ2+nRvoNXo2veK/WUlLSQwa
e/cQs5LwJ4vFrmGUw0YONiIakGY1jFvSb+3a23WDgwJ/wY8TTJkWjF0olluvmbOl
fW6DtnNks5R9F5K5ydAvhRQzZJzojZS35REpzMSInlEtANcFQ3hfuhom3qRoWOqa
RfqrMLfdjZMk5ZvD5pxYRUmcz8AdN5GzXPJ4M5q0kO0ozJGtvgYXqxxmNquZmHBg
WhSie7075lSqRW25vSy+EdrxZn2kSjTr7ZOs4F9pX5Zd/VCypZulNkPduCEh3HQm
1H+AMhaYuSoTFClnWghBZbUJGbkzj0wAPulFaRyccs9StSLK5T5BS0JIWq+E7Hjk
x0et6pVsTmsF2PCmQl3ocPl+ia1o2kqAvtMFJrwr/6q1X5vPrnbjK009cJzwDZPb
7njLB/muafn9r+loYVU3MHoRq8JNO8xNB+O9jD2Q5q51tAovvbzQQupX39JafDNe
MMxTM3AUDGCc/x3BTzr6T62fu3m9f97b3yKw0O+CKWlh7rwUZvOldVa1PXHWSBKj
4OP39tcVNOqMJxMVBW5kcNlb3rWR+M6bELJQOlciLcBYxMbBMGRDG0U10KbiVOdJ
8WYKk1flkGwbfIpQHzv99fSMKNKzNWhQI/kochk2TFwa2I042N45Z2gjnJREHdiV
EZD+woQKBAPRAKE6RO7t
=7mQj
-----END PGP SIGNATURE-----

--n8g4imXOkfNTN/H1--
