guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: MinGW open-process, take N


From: Andy Wingo
Subject: Re: MinGW open-process, take N
Date: Thu, 14 Jul 2016 12:20:09 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

On Tue 12 Jul 2016 16:46, Eli Zaretskii <address@hidden> 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 via email to

[Prev in Thread] Current Thread [Next in Thread]