unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: rixed@happyleptic.org
To: guile-user@gnu.org
Subject: Re: debugging guile runtime
Date: Tue, 30 Aug 2011 18:25:27 +0200	[thread overview]
Message-ID: <20110830162527.GA20481@ccellier.rd.securactive.lan> (raw)
In-Reply-To: <87wrduhp1x.fsf@gnu.org>

-[ Tue, Aug 30, 2011 at 05:55:22PM +0200, Ludovic Courtès ]----
> Like in C, it???s up to the application to close those ports that it
> considers worth closing upon exec.

I was under the impression that the idiom was to close all files before
execing a coprocess, but I just checked POSIX popen, R.Stevens and libslack
and none does that. Well, the lib I'm used to does that and it felt
natural to do so that I erroneously assumed it was a mandated behavior
(so that running a coprocess is similar to running a program from a
shell).

OK then, so it's not a bug and I have to live with this behavior
(BTW, if anyone knows the rational behind this, I would be glad to
know).

> If what you want is to close every FD from 3 to ???, then the typical way
> to do this is to loop over those numbers and call close(2) (that???s how
> libdaemon and similar tools do that.)

Except that, as previously discussed in another thread, there is no easy
way to do that between the fork and the exec (since I don't want to
actually close these files in the main program that starts the pipe).

Anyway, what about the other bugs?
Is there anything I could do to advance the thread-safety issue for instance?




  reply	other threads:[~2011-08-30 16:25 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-29 12:50 debugging guile runtime rixed
2011-08-29 14:35 ` Nala Ginrut
2011-08-29 16:24   ` rixed
2011-08-29 19:20     ` Thien-Thi Nguyen
2011-08-30 10:56       ` rixed
2011-08-30 15:55         ` Ludovic Courtès
2011-08-30 16:25           ` rixed [this message]
2011-08-30 22:25             ` Ludovic Courtès
2011-08-31  7:38               ` rixed
2011-08-31 21:10             ` Andy Wingo
2011-08-31 21:07 ` Andy Wingo
2011-09-01 11:32   ` rixed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110830162527.GA20481@ccellier.rd.securactive.lan \
    --to=rixed@happyleptic.org \
    --cc=guile-user@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).