On Tue 12 Jul 2016 16:46, Eli Zaretskii <e...@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