[LINUX/QNX] encountered a problem Stopped (TTY input)

Source: Internet
Author: User

You want the process that sends the data to run in the background, but this problem occurs when you start the process.

In general, this problem may be related to the following reasons:

"[1] + Stopped (TTY input)" means that the program tries to read from the control terminal, but is stopped by the sigttin signal because it is running in the background:
The man signal has the following output:

Sigttin Stop process Background read attempted from Control terminal

The following program demonstrates this scenario:

void Sig_ttin (int signum) {(void) printf ("%s:sigttin CAUGHT.N", __func__); Signal (Sigttin, SIG_DFL);}        int main (void) {int n;        Signal (Sigttin, sig_ttin);        scanf ("%d", &n); return 0;}

But I guess it is because the process is to read data from the serial port, and this serial port is connected to the debug terminal, so this process and the terminal (TTY) associated with, belong to the foreground process group.

Because the test found that even when sending characters to stdout, the process can be placed in the background, as long as the serial port is not opened.

Related stuff:

LINUX/QNX Command:jobs, FG, nohup

[LINUX/QNX] encountered a problem Stopped (TTY input)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.