RFA: add 'pex_write_input' to libiberty pipeline library

DJ Delorie dj@redhat.com
Mon Mar 13 23:01:00 GMT 2006


> +This call is not supported on systems which do not support pipes; it
> +returns with an error.  (We could implement it by writing a temporary
> +file, but then you would need to write all your data and close
> +@var{fp} before your first call to @code{pex_run} --- and that
> +wouldn't work on systems that do support pipes: the pipe would fill
> +up, and you would block.  So there isn't any easy way to conceal the
> +differences between the two types of systems.)

DJGPP handles this just fine; the trick is to define an API call
before and after the writing happens, and let libiberty decide when
it's going to start the child processes.

Is there a specific need for functionality that will fail on DJGPP?

> +If you call both @code{pex_write_input} and @code{pex_read_output}, be
> +careful to avoid deadlock.

I suggest that if you call both, one should return an error.



More information about the Gcc-patches mailing list