My embedded system has one background program which generates some output message to console. 
When it's not finished, the login program starts and prompt login string to same console as well.

My question is, when the login prompt string comes out, the output message generated by the background program is not aligned like this:

---

```
Embedded System login: msg_line1...
                                   msg_line2...
                                               msg_line3...

```

The expected output should be:

---

```
Embedded System login: msg_line1...
msg_line2...
msg_line3...
msg_line4...

```

---

Have no idea how to resolve the problem...
Could anyone help?

THX!!