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:message-id:date:from:reply-to:mime-version:to
	:subject:references:in-reply-to:content-type
	:content-transfer-encoding; q=dns; s=default; b=IfwT90VAeDkZNCei
	pqWpPcCXtPwX+wldMZLT8Z6sUBb4WEOXyPK3UAPHv2UX0SrkWoKbrlB5JjcC5fg+
	WQ/ubkPBUrYQA3s1024GhyitSFMyctXHZkzjZe3Ro4vegvT5o4tXBsuR5qiM1yEs
	W5U4U13ZU5auH0Q/BukVv1ThV2I=
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:message-id:date:from:reply-to:mime-version:to
	:subject:references:in-reply-to:content-type
	:content-transfer-encoding; s=default; bh=1GP19iE6TmiUs2l2ICKlu8
	+hsvM=; b=pOxqalkx8VujMXESwvuIkaLMMVAH9aRDzG2fj4FWcm0h8hHtILgePv
	LGqoHqL3Kd2nw5NylLavFSK9qxhG+kiGu7rSf2sB+cEI4tww+N8qEp2Wv1CfLJ+S
	Z8u3L5+0o75UQ57wOOKZMmmOGQ9ub9A8CoXfkCqycxNADdrDUb3j0=
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=-1.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2
X-HELO: vms173013pub.verizon.net
Message-id: <526FED2A.20906@cygwin.com>
Date: Tue, 29 Oct 2013 13:15:22 -0400
From: "Larry Hall (Cygwin)" <reply-to-list-only-lh@cygwin.com>
Reply-to: cygwin@cygwin.com
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.0.1
MIME-version: 1.0
To: cygwin@cygwin.com
Subject: Re: fork() and NT error 0xC0000135 (STATUS_DLL_NOT_FOUND)
References: <5F8AAC04F9616747BC4CC0E803D5907D0C40B026@MLBXv04.nih.gov>
In-reply-to: <5F8AAC04F9616747BC4CC0E803D5907D0C40B026@MLBXv04.nih.gov>
Content-type: text/plain; charset=ISO-8859-1; format=flowed
Content-transfer-encoding: 7bit

On 10/29/2013 12:13 PM, Lavrentiev, Anton (NIH/NLM/NCBI) [C] wrote:
> Hello All,
>
> I can't find a similar problem reported earlier, so please excuse the question
> if it looks familiar.
>
> We have a software package that installs like a miniature CYGWIN deployment
> (basically, only cygwin1.dll and just a few other libraries in /bin
> along with cygrunsrv.exe), and there are no shells.
>
> cygrunsrv.exe is used to register and launch a Windows service with a binary
> located under "/opt/..." (which is a ported UNIX server).  The binary is started
> just fine, but when it tries to fork(), it gets the error 0xC0000135 (w/ errno=11,
> EAGAIN).  I traced it down to the fact that before fork() there is chdir("/") in
> that server binary.  Can it be the reason for the failed fork() that it can no longer
> find cygwin1.dll?  Unfortunately, I can't extend Windows PATH to include the
> CYGWIN /bin directory (because the cygrunsrv runs under an unmanaged service
> account).  Is there any other fix?

I'll go out on a limb and say that all UNIX/POSIX platforms expect /bin
and/or /usr/bin to be in your path if you're not specifying an absolute
path when invoking your binaries.  This is not an unusual expectation
and isn't confined to the UNIX/POSIX world.  There isn't any "fix" that
will be forthcoming in the Cygwin DLL that will change this expectation,
though there may be others on this list that have some clever workarounds
that you could try.

-- 
Larry

_____________________________________________________________________

A: Yes.
 > Q: Are you sure?
 >> A: Because it reverses the logical flow of conversation.
 >>> Q: Why is top posting annoying in email?

--
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

