<div dir="ltr"><div dir="ltr">On Wed, Feb 27, 2019 at 12:49 PM Dhananjay Patil <<a href="mailto:Dhananjay.Patil@ltts.com">Dhananjay.Patil@ltts.com</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">





<div lang="EN-US">
<div class="gmail-m_-4826869529436433725WordSection1">
<p class="MsoNormal">Dear All,<u></u><u></u></p>
<p class="MsoNormal">We successfully login using telnet on board. <u></u><u></u></p>
<p class="MsoNormal">Our application start as systemd service in order to start at boot time.
<u></u><u></u></p>
<p class="MsoNormal">We define service as follow:<u></u><u></u></p>
<p class="MsoNormal">[Unit]<u></u><u></u></p>
<p class="MsoNormal">Description=Initmyapplication<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">[Service]<u></u><u></u></p>
<p class="MsoNormal">ExecStart=/usr/bin/myapplication &</p></div></div></blockquote><div><br></div><div>The '&' is useless; ExecStart does not accept shell syntax, so all this is doing is passing a literal "&" in the program's argv. All services are already "in background" by definition.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div lang="EN-US"><div class="gmail-m_-4826869529436433725WordSection1"><p class="MsoNormal"><u></u><u></u></p>
<p class="MsoNormal">Our application have some debug messages implemented using printf.<u></u><u></u></p>
<p class="MsoNormal">After completing login process using telnet those printf are not visible on telnet.</p></div></div></blockquote><div><br></div><div>By default, services' output goes to the system log (journal or syslog). You should be able to find them in `systemctl status myapp` or `journalctl -b -u myapp`. (In recent systemd versions, you can also redirect the output to a file.)</div><div><br></div><div>Note that libc buffers stdout when writing to files or pipes, which can cause the printf output to be delayed. Make sure the application calls fflush(stdout) after every debug printf, or use setlinebuf(stdout) on application startup to switch to line-buffered mode.</div><div><br></div></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr">Mantas Mikulėnas</div></div></div>