Determining whether or not the tty *is* in raw tty mode is not something we want to be checking in that particular function though, and it's also somewhat platform specific.
Seems to me that the patch suggested by jaltman at least makes sense by ordering those two characters correctly. I don't think it's practical to query the tty state in that function. On Thu, Nov 4, 2010 at 4:38 PM, Jeffrey Hutzelman <jh...@cmu.edu> wrote: > --On Thursday, November 04, 2010 03:49:32 PM -0400 Jeffrey Altman < > jalt...@secure-endpoints.com> wrote: > > On 11/4/2010 3:30 PM, Phillip Moore wrote: >> >>> Does anyone know why, in src/comerr/com_err.c, >>> in default_com_err_proc(), the code does the following: >>> >>> putc('\n', stderr); >>> /* should do this only on a tty in raw mode */ >>> putc('\r', stderr); >>> fflush(stderr); >>> >>> >> This should be: >> >> /* should do this only on a tty in raw mode */ >> putc('\r', stderr); >> putc('\n', stderr); >> fflush(stderr); >> >> since the CR always is before the LF. MIT fixed this in their code base >> more than a decade ago. OpenAFS inherited the brokenness. >> >> Whether OpenAFS wishes to output as CR-LF at all is a separate matter. >> I suspect the answer should be 'no'. >> > > In fact, the answer should be to do so only when stderr is a tty in raw > mode, like the comment says. > _______________________________________________ > OpenAFS-devel mailing list > OpenAFS-devel@openafs.org > https://lists.openafs.org/mailman/listinfo/openafs-devel >