delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/12/08/14:10:28

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
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
Message-ID: <20041208191003.41033.qmail@web53002.mail.yahoo.com>
Date: Wed, 8 Dec 2004 11:10:03 -0800 (PST)
From: Andrew Que <que_andrew AT yahoo DOT com>
Subject: FOLLOWUP: 1.5.12: problems without registry keys
To: cygwin AT cygwin DOT com
MIME-Version: 1.0
Note-from-DJ: This may be spam

--0-955808160-1102533003=:40461
Content-Type: text/plain; charset=us-ascii
Content-Id: 
Content-Disposition: inline

   I apologise ahead of time, I could not for the life
of me figure out how to send a reply to a thread.  The
original thread is 101373: "1.5.12: problems without
registry keys"
  In my original post, I noted not all apps crashed
without the registry key.  So, I tried to narrow it
down.  It looks like apps. that use semaphores lock up
every time.

I attached an example of an app that will lock up
without the registry keys present.

To compile:
  gcc Semaphore.cpp -o Semaphore.exe

(PS. The example is just a semaphore coalition test--
and it's terrible code)

Andrew Que
email: cygwin at drque dot net
(http://www.DrQue.net/)

>    I have a custom app. (linux or windows) I've been
> compiling with cygwin for about 6 months.  It use to
> run fine on any computer as long as there was a copy
> of "cygwin1.dll" along with the exe.
>    Now (ver 1.5.12) the app just hangs on any
computer
> that doesn't have cygwin installed.  After a lot of
> hair pulling, I think I've discovered the issue.  In
> the registry, there are a set of keys for the
cygwin's
> mount points.  For some applications (such as mine),
I
> fount you will need these registry keys or the app
> will simply hang.
>    My application is a bit complicated to explain,
but
> usually froze at some point trying to open a file
> stream.  But some other apps I compiled didn't have
> this issue.  The app uses pthreads and semaphores
(the
> functioning app did not).  I could answerer any
> questions or possibility write some code to
reproduce
> this problem if it would help.
>    Even if they registry keys don't point to
anything
> valid, the application still runs.  Says to me,
> cygwin1.dll just needs the keys to exist.
>    I have a working solution, but I thought I'd post
> this in case someone else is banging their head on a
> desk somewhere.
> 
> 
> Andrew Que
> email: cygwin at drque dot net
> (http://www.DrQue.net/)




		
__________________________________ 
Do you Yahoo!? 
Yahoo! Mail - 250MB free storage. Do more. Manage less. 
http://info.mail.yahoo.com/mail_250
--0-955808160-1102533003=:40461
Content-Type: application/octet-stream; name="Semaphore.cpp"
Content-Transfer-Encoding: base64
Content-Description: Semaphore.cpp
Content-Disposition: attachment; filename="Semaphore.cpp"

I2luY2x1ZGUgPHN0ZGxpYi5oPg0KI2luY2x1ZGUgPHN0ZGlvLmg+DQojaW5j
bHVkZSA8cHRocmVhZC5oPg0KI2luY2x1ZGUgPHNlbWFwaG9yZS5oPg0KI2lu
Y2x1ZGUgPHVuaXN0ZC5oPg0KI2luY2x1ZGUgPGVycm5vLmg+DQojaW5jbHVk
ZSA8c3RyaW5ncy5oPg0KDQpzZW1fdCBzZW07DQoNCmJvb2wgdm9sYXRpbGUg
SXNSdW5uaW5nID0gdHJ1ZTsNCmNoYXIgdm9sYXRpbGUgU3RhdGVzWyA2IF0g
PSAid3d3d3ciOw0KDQpzdGF0aWMgdm9pZCogVGVzdF9UaHJlYWQoIHZvaWQq
IFdhaXRUaW1lUGFyYW1ldGVyICkNCnsNCiAgIGludCBXYWl0VGltZSA9ICoo
aW50KilXYWl0VGltZVBhcmFtZXRlcjsNCg0KICAgd2hpbGUgKCBJc1J1bm5p
bmcgKQ0KICAgew0KICAgICBTdGF0ZXNbIFdhaXRUaW1lIF0gPSAndyc7DQog
ICAgIHNlbV93YWl0KCAmc2VtICk7DQoNCiAgICAgaWYgKCBzdHJjbXAoIChj
aGFyKilTdGF0ZXMgLCAid3d3d3ciICkgIT0gMCApDQogICAgICAgcHJpbnRm
KCAiXG5Db2xsaXNpb246ICVzI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kICwgKHZvaWQqKSZXYWl0MyApOwpzdGF0aWMgVGhyZWFkQ2xh
c3MgWWVyTW9tVGhyZWFkNCggVGVzdF9UaHJlYWQgLCAodm9pZCopJldhaXQ0
ICk7CnN0YXRpYyBUaHJlYWRDbGFzcyBZZXJNb21UaHJlYWQ1KCBUZXN0X1Ro
cmVhZCAsICh2b2lkKikmV2FpdDUgKTsKDQp2b2lkKiBTY3JlZW4oIHZvaWQq
ICkNCnsNCiAgIHdoaWxlICggSXNSdW5uaW5nICkNCiAgIHsNCiAgICAgcHJp
bnRmKCAiJXNcciIgLCBTdGF0ZXMgKTsNCiAgICAgZmZsdXNoKCBzdGRvdXQg
KTsNCiAgICAgdXNsZWVwKCAxMDAgKTsNCiAgIH0NCg0KICAgcmV0dXJuIE5V
TEw7DQp9DQoNCnN0YXRpYyBUaHJlYWRDbGFzcyBTY3JlZW5UaHJlYWQoIFNj
cmVlbiApOwoNCmludCBtYWluKCkNCnsNCiAgIHNsZWVwKCAzMCApOw0KDQog
ICBJc1J1bm5pbmcgPSBmYWxzZTsNCg0KICAgcHJpbnRmKCAiU2h1dGluZyBk
b3duLi4uXG4iICk7DQogICBzbGVlcCggMSApOw0KfQ0K


--0-955808160-1102533003=:40461
Content-Type: text/plain; charset=us-ascii

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/
--0-955808160-1102533003=:40461--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019