I have created an executable that releases the terminal control and puts itself in the bg. I have made it to print messages every 2 seconds.
Say, I execute it from a terminal (ttyp3) and then exit. When somebody tries to telnet to the server, this tty (ttyp3 in this case) is re-allocated even before the bg job is over. Hence, the output of the bg process appear on the console (even before logging in to the system).
Attaching the source file for your reference.
This scenario doesn’t exist on Linux because that particular tty is not re-allocated to anybody till the job is over.