subprocess interface improvements

Bug #354712 reported by Andreas Rottmann
2
Affects Status Importance Assigned to Milestone
Ikarus Scheme
Fix Committed
Low
Abdulaziz Ghuloum

Bug Description

It would be nice if the subprocess interface could be extended to cover these cases:

1) Allow choosing not to search $PATH (i.e. use execv() instead of exevp()).
2) Allow specifying the environment for the subprocess.
3) Allow using existing file handles as std{in,out,err} for the subprocess, to allow building pipelines. This would
    probably involve providing a way (internally) to get at the file descriptor underlying a specific port.

--Rotty

Related branches

Revision history for this message
Andreas Rottmann (rotty) wrote :

I've hacked up a quick patch that does (1) and (3) -- it turned out the filehandles are readily available, so this was rather straightforward. I'm not sure about what API should be exposed to the user; the `process*' procedure I added takes quite a lot of arguments; any ideas how to enhance the API?

If my patch aims into the right direction, I'll refine it (e.g. add (2)), and when an API is settled upon, I could also write docs, if wanted.

Revision history for this message
Andreas Rottmann (rotty) wrote :

I've attached a new version of the patch which also covers environment passing and adds an implementation of the `execve()' function, which is not in POSIX (and also missing from glibc), allowing to search the current $PATH, while at the same time specifying a new environment for the created process.

Revision history for this message
Andreas Rottmann (rotty) wrote :

I've rebased the patch (onto bzr r1806) and fixed it, so that it works with the port internal representation changes in bzr r1803.

Revision history for this message
Abdulaziz Ghuloum (aghuloum) wrote :

Fixed in 1853.

Changed in ikarus:
assignee: nobody → Abdulaziz Ghuloum (aghuloum)
importance: Undecided → Low
status: New → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.