delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2011/05/30/17:12:45

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=0.3 required=5.0 tests=AWL,BAYES_00,DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED,RCVD_NUMERIC_HELO,SPF_HELO_PASS,TW_CG,TW_FD,T_RP_MATCHES_RCVD,T_TO_NO_BRKTS_FREEMAIL
X-Spam-Check-By: sourceware.org
To: cygwin AT cygwin DOT com
From: Juanjo <juanjose DOT garciaripoll AT gmail DOT com>
Subject: Re: Problem with Cygwin's fdopen and Windows handles
Date: Mon, 30 May 2011 21:12:06 +0000 (UTC)
Lines: 49
Message-ID: <loom.20110530T230200-528@post.gmane.org>
References: <loom DOT 20110529T133128-564 AT post DOT gmane DOT org> <20110529233841 DOT GC5283 AT ednor DOT casa DOT cgf DOT cx> <loom DOT 20110530T093057-556 AT post DOT gmane DOT org> <20110530174649 DOT GB14225 AT ednor DOT casa DOT cgf DOT cx>
Mime-Version: 1.0
User-Agent: Loom/3.14 (http://gmane.org/)
X-IsSubscribed: yes
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

Christopher Faylor <cgf-use-the-mailinglist-please <at> cygwin.com> writes:
> 
> Please calm down.

I am calm :-) I just happen to like exclamation signs.
 
> I guess I shouldn't have said the "doesn't really work" and stuck with
> "of limited utility".  fds attached with cygwin_attach_handle_to_fd are
> not fully functional.

You still have not answered my question. C fds are working. They
allow read() write() and close(). The question is actually why fread()
does not work. From your email I still am not convinced that
the problem is with cygwin_attach_handle_to_fd(). Do ANSI streams
need something that C file ids do not provide?

> >I have seen messages in a sibling mailing list reporting that fork()
> >fails when a program injects libraries using various mechanisms
> >http://sourceware.org/ml/cygwin/2011-04/msg00185.html
> 
> "sibling mailing list"?  That is this mailing list.

Sorry, it is very difficult for me to identify in gmane the actual name
of the mailing list.

> If you have an application which uses a lot of dlls then best practice
> for Windows DLLs is to build them with unique load addresses.  Barring
> that you could rebase them with cygwin's rebase or rebaseall utilties.
> Setting unique base addresses will actually cause your application to
> load slightly faster whether you use Cygwin or not.

It seems I did not express myself properly. Code is compiled on the fly.
DLLs do not survive beyond program execution. This is a dynamic language
(Common Lisp btw) and functions are compiled and run and consumed
quickly. Calling rebase for each invocation is overkill (it will scan the
whole system!) and I would not even know how to start assigning
fixed addresses to libraries myself.

Let me insist that we could live without fork if only
fread() on Windows handles worked -- all ECL needs is a means
to execute programs with redirected input/output & error channels
(a bit beyond what popen() does).

If the answer is we should abandon Cygwin or deprecate it for this
project, it would be nice to know.

Best regards,

Juanjo


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

- Raw text -


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