The dtexec code assumes that fstat reports pipe's readable chars. Linux always reports 0 for st_size of a pipe. Instead read one character when select reports readable. Note EOF when select says readable but read returns 0.
The dtexec code assumes that fstat reports pipe's readable chars. Linux always reports 0 for st_size of a pipe. Instead read one character when select reports readable. Note EOF when select says readable but read returns 0.