-----BEGIN PGP SIGNED MESSAGE-----
email@example.com (Paul Wilson) writes:
> No. I'm trying to figure out what the spec should be, so that it's
> easily portable but still useful.
I'm still trying to figure out what you're trying
to do or accomplish which isn't handled by the (run) form
and its relatives.
(run (| (cat group) (grep wheel))) abstracts lots of
things enough that you don't really need a POSIX system
underneath. However, alot of the stuff that uses the run
form in my experience is not easily portable to non-UNIX
systems, sometimes due to filenames, sometimes due to the
programs run invokes, and sometimes because UNIX-style
pipeline concurrency is really necessary for the task.
If one wanted to be sneaky, one could adjust the "path"
that (run) uses so that before execvp it would look for
a scheme function to use instead, and even have that run
within the parent process if it could be done hygenically
or if you the programmer decided its side-effects would be
Other optimizations might be possible. For instance:
(run (begin (run (begin (run (begin (run (ps))))))))
could be collapsed into a single (run (ps)), (or better
still, a call to a function ;> Think that's funny? Think
of (run (date)) vs (date->string (date))), thus saving
yourself the multiple instances of scsh.
[FWIW, on even a relatively slow NetBSD-1.2_BETA machine,
I don't notice any human-troubling time difference between
running a form in one scsh and running a form buried in
several (run (begin (run (begin (...))))), thanks to a
> (Another poster didn't seem to notice that my original posting was
> talking about faking spawn() on unix with fork() and exec() from
> a little server process that just forks the things that need to
> be spawned.)
If that's me, it's because I still don't understand what
you're trying to build. Maybe you could explain it in
terms of an application? That might help.
> One thing that would be good would be simple spawning of filter processes
> that you can pipe together. Nothing fancy, just a filter.
Like (run (| ...)) ? Or something different?
-----BEGIN PGP SIGNATURE-----
Comment: PGP Public Key in ftp://ftp.sprintlink.net/engineer/smd/pgpkey
-----END PGP SIGNATURE-----