unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Andy Wingo <wingo@pobox.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: mhw@netris.org, ludo@gnu.org, guile-devel@gnu.org
Subject: Re: MinGW open-process, take N
Date: Thu, 14 Jul 2016 12:20:09 +0200	[thread overview]
Message-ID: <8737nc1pye.fsf@pobox.com> (raw)
In-Reply-To: <83d1mic3sd.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 12 Jul 2016 17:46:42 +0300")

On Tue 12 Jul 2016 16:46, Eli Zaretskii <eliz@gnu.org> writes:

>> But in reality the getuid is of this form:
>> 
>>   (define (load-user-init)
>>     (let* ((home (or (getenv "HOME")
>>                      (false-if-exception (passwd:dir (getpwuid (getuid))))
>>                      file-name-separator-string))  ;; fallback for cygwin etc.
>>            (init-file (in-vicinity home ".guile")))
>>       (if (file-exists? init-file)
>>           (primitive-load init-file))))
>> 
>> So, no problem.
>
> Won't this fail to compile during boot, or at least produce a warning?

It will produce a warning at compile-time, yes, but no problem at
run-time because of the false-if-exception block.

>> Hummmm, I don't know, there are a number of other things in that file
>> which treat PIDs as ints (scm_waitpid, scm_getppid, etc etc etc).  I
>> think that would need to be another patch that adds scm_from_pid_t and
>> scm_to_pid_t and so on.  And then what is this?
>> 
>>   http://permalink.gmane.org/gmane.comp.gnu.mingw.w64.general/12235
>
> The process ID is indeed an int, but my code hides a process handle
> inside it.

If you don't mind my asking: why? :)  The caller effectively just
returns the PID to Scheme, at which point it has a not-quite-PID
floating around.  Sounds like trouble to me.

Andy



  reply	other threads:[~2016-07-14 10:20 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-11 21:51 MinGW open-process, take N Andy Wingo
2016-07-12 13:02 ` Eli Zaretskii
2016-07-12 14:05   ` Andy Wingo
2016-07-12 14:46     ` Eli Zaretskii
2016-07-14 10:20       ` Andy Wingo [this message]
2016-07-14 15:34         ` Eli Zaretskii
2016-07-14 18:11           ` Andy Wingo
2016-07-14 18:41             ` Eli Zaretskii
2016-07-14 21:31               ` Andy Wingo
2016-07-16 10:54                 ` Eli Zaretskii
2016-07-16 11:32                   ` Andy Wingo
2016-07-16 12:08                     ` Eli Zaretskii
2016-07-16 13:24                     ` Eli Zaretskii
2016-07-16 17:02                       ` Eli Zaretskii
2016-07-23  9:56                         ` Andy Wingo

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=8737nc1pye.fsf@pobox.com \
    --to=wingo@pobox.com \
    --cc=eliz@gnu.org \
    --cc=guile-devel@gnu.org \
    --cc=ludo@gnu.org \
    --cc=mhw@netris.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).