This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/AM5728: systemd (tcgetattr(), printf() ) issue

Part Number: AM5728

Tool/software: Linux

hello, We use "AM5728, PSDK 04_00_00_04".
Currently, we have used systemd to run the program we developed automatically.

However, there are some problems with the systemd operation.
I would like to get help on this.

1. init fail tcgetattr()
The program we developed should receive keyboard input from the terminal.
However, if executed with systemd, init fails with tcgetattr () function.
Are there restrictions on using the function in systemd?

If you run the program directly from the console, it works without problems.
There is no problem when executing directly from the terminal.

root@am57xx-evm:/#systemctl start test.service 
=> Run fail.
root@am57xx-evm:/#./test
=> Run ok.


2. printf() Debug message output.
When I run the program with systemd, the text (hello world) is not output.
This is our example Systemd service.

test.service
=======================================
[Unit]
Description= start test PG

[Service]
Type=simple
ExecStart=/etc/init.d/helloworld.sh
StandardOutput=journal+console

[Install]
WantedBy=multi-user.target
=======================================

helloworld.sh
=======================================
echo "Hello World!!!"
=======================================

root@am57xx-evm:/#systemctl start test.service 
=>No display message

root@am57xx-evm:/#./helloworld.sh
Hello World!!!"

Could you tell me how to do this?
There is no problem when executing directly from the terminal.


3. Can not use init.d process?
We have init.d still useful.

Thank you.