|
From: | Graham Fawcett |
Subject: | Re: [Chicken-users] Wierd behaviour of process. |
Date: | Mon, 15 Jan 2007 14:51:32 -0500 |
On 1/15/07, felix winkelmann <address@hidden> wrote:
On 1/15/07, Graham Fawcett <address@hidden> wrote: > > You can't just drop this in an egg, though; the definintion of > ##sys#process-wait is not public, and your compile will fail. Add it > to posixuinx.scm in your Chicken source tree, and then rebuild and > reinstall Chicken. That's a bit extreme, I suppose. :-) But perhaps a > build-guru on the list has a way to build this as a normal extension. ##sys#process-wait is private, but not hidden. You can access it from user code without problems.
Are you sure, Felix? Maybe I'm doing something wrong here: ;;;; mypw.scm (use posix) (define my-process-wait (lambda args (let-optionals* args ([pid #f] [nohang #f]) (let ([pid (or pid -1)]) (##sys#check-exact pid 'process-wait) (receive [epid enorm ecode] (##sys#process-wait pid nohang) (if (fx= epid -1) (values #f #f #f) (values epid enorm ecode) ) ) ) ) ) ) ;;; -- end of file address@hidden:/tmp$ csc -s mypw.scm address@hidden:/tmp$ csi ___| | _) | | __ \ | __| | / _ \ __ \ | | | | | ( < __/ | | \____|_| |_|_|\___|_|\_\\___|_| _| Version 2.5 - linux-unix-gnu-x86 - [ libffi dload ptables applyhook ] (c)2000-2006 Felix L. Winkelmann ; loading /home/graham/.csirc ... #;1> (use mypw) ; loading ./mypw.so ... #;2> (my-process-wait 2) Error: unbound variable: ##sys#process-wait Not that it really matters. :-) --Graham
[Prev in Thread] | Current Thread | [Next in Thread] |