Re: [ptest-runner][PATCH] Fix inappropriate ioctl when detaching tty


Anibal Limon
 



On Wed, 8 Jul 2020 at 01:46, Tero Kinnunen <tero.kinnunen@...> wrote:
On Tue, Jul 7, 2020 at 06:49 AM, Anibal Limon wrote:
First thanks for the patch, Is there an option to test for isatty(fd) for run ioctl instead?.
Hi Anibal,

    if (isatty(0) && ioctl(0, TIOCNOTTY) == -1)

would help for ssh case but not to errors between tests. There fd 0 is a tty but detach should
be done only once. Now it is inside loop. It could work if it was also moved outside the loop,
before PTEST_LIST_ITERATE_START?

Agree, Add isatty(0) and move that validation outside the loop.

Anibal
 

Kind regards,

    - Tero

Join yocto@lists.yoctoproject.org to automatically receive all group messages.