On 23/6/2006, at 18:17, Sylvain Benilan wrote:
Is there a simple way to read the entire input stream using blocking read(2)?
Yes, just read it :)
I can select(2) stdin to avoid command blocking but wondered why not having an environment variable holding the input length like in a CGI environment ?
TextMate will provide you with data on the pipe roughly as fast as you can read it, so there should be no fear of “blocking” -- and if there was, I don’t see how that could be avoided if your command actually needs the data.
Could you be more specific about what the problem is, if there is one? I.e. what command are you writing.