[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] Any way to get the scsh-process egg working on Windo
From: |
Peter Bex |
Subject: |
Re: [Chicken-users] Any way to get the scsh-process egg working on Windows? |
Date: |
Wed, 7 Aug 2013 16:22:29 +0200 |
User-agent: |
Mutt/1.4.2.3i |
On Wed, Aug 07, 2013 at 09:34:18AM -0400, Omar Antolín Camarena wrote:
> Hi everyone!
Hello, Omar!
> I love the convenience of the SCSH process notation and would like to
> be able to use it on Windows, but it currently uses process-fork
> internally and this function is unavailable on native Windows chicken
> builds. I was a little surprised that the run macro in scsh-process
> uses process-fork, I expected it to use just the pipe functions from
> the posix unit. Why doesn't it, is it just to share code with the &
> macro or is there some obstacle to implement it using only the pipe
> functions?
The reason is that scsh-process is extremely flexible in how it
allows you to wire up the input/output/error descriptors, via the EPF
(extended process form) notation. It's even possible to wire up
nonstandard file descriptors to Scheme objects or different programs.
If I were to add a special treatment for "simple" process forms, that
would duplicate most of the code, I'm afraid.
> Do people have any advice on getting the run macro from scsh-process
> to work on windows (I guess the & macro would definitely be harder)
> with a minimum of hassle? Should I install cygwin? (And then building
> chicken, I guess, since the chicken in the cygwin package list is old:
> 3.4) Try to reimplement (the subset I need of the functionality of)
> run using only pipes?
Maybe there's some way to get fork-like functionality on Windows?
Then it could be "emulated" by the process-fork implementation of the
POSIX unit on Windows. That would require patching CHICKEN core,
but once done it would make a lot of programs a lot more portable.
Cheers,
Peter
--
http://www.more-magic.net