<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.28.1">
</HEAD>
<BODY>
Hi Guys<BR>
<BR>
I keep hitting these really odd issues. Some I can sort out and for others I'm just glad this list exists!<BR>
<BR>
I have a command line application that outputs status messages to the console as it runs. In my c++ code I use the following:<BR>
<BR>
cout << "status message \n";<BR>
<BR>
When I log into a virtual terminal and run it all output lines appear below each other as exptected:<BR>
<BR>
Line 1<BR>
Line 2<BR>
Line 3<BR>
...<BR>
<BR>
However, when I start the application from rc.local and redirects its output such that it runs on a virtual terminal (where no one has logged in) the output appear as follows:<BR>
<BR>
Line 1<BR>
Line 2<BR>
Line 3<BR>
...<BR>
<BR>
It appears something changes on the terminal once someone has logged in. I could fix the problem by changing my c++ code to:<BR>
<BR>
cout << "status message \r\n";<BR>
<BR>
This forces a carriage return (like on the old typewriters). However, these output command are spread out over several files on serveral applications and it would be a mammoth task to fix.<BR>
<BR>
Is there something I can call from rc.local that would change the behaviour of a virtual terminal (similar to that once someone has logged in)? I've looked at the setterm man page, but couldn't find anything there.<BR>
<BR>
Regards<BR>
Charl
</BODY>
</HTML>