I'm not exactly sure what this feature will be used for. If you want
to script something around a program expecting to run in a term there
are already better tools for that like expect [1]. I'm not the one who
added this goal.
On Wed, Sep 12, 2012 at 8:22 PM, Roberto E. Vargas Caballero
<k0ga_AT_shike2.com> wrote:
> I agree with you that it is a bit stupid, and maybe we should use directly
> write. Look these new patches.
I was thinking of using the dup2 syscall in the shell process (fork
child) to make the the stderr/stdout redirect to the file. That way
you don't even need to call write explicitely. But I'm not sure you
can do this since I'm already redirecting them to the cmdfd. I don't
know if it's faster either. Hence my previous comment in the form of a
question :)
Since we're dealing with a hdd, my guess would be that buffered io is
faster given you buffer more than 1 character (which was not the case
the first patch). It really all depends on what this feature is for.
To me it just look like some kind debug tool for st.
1:
http://en.wikipedia.org/wiki/Expect
Received on Sun Sep 16 2012 - 12:33:34 CEST