All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: Martin Doucha <mdoucha@suse.cz>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH 2/2] pty04: Fix cleanup
Date: Fri, 20 May 2022 11:01:33 +0200	[thread overview]
Message-ID: <YodY7QOisdpaI3KK@pevik> (raw)
In-Reply-To: <20220519121056.1181-2-mdoucha@suse.cz>

Hi Martin, Li, Cyril,

> If pty04 gets executed with -i0 argument, the sk file descriptor will
> stay zero and cleanup() will close stdin, which can result in the parent
> shell logging out. Initialize global file descriptors to -1 and only
> clean up those that were left open by the test.

Reviewed-by: Petr Vorel <pvorel@suse.cz>

Thanks a lot. As and obvious fix I'm going to merge it later today.

BTW C API would deserve (after the release) TBROK on -i0, which is already
implemented in shell API:
df01 1 TBROK: Number of iterations (-i) must be > 0

Kind regards,
Petr

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  reply	other threads:[~2022-05-20  9:01 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-19 12:10 [LTP] [PATCH 1/2] pty07: Resize console to the same size as before Martin Doucha
2022-05-19 12:10 ` [LTP] [PATCH 2/2] pty04: Fix cleanup Martin Doucha
2022-05-20  9:01   ` Petr Vorel [this message]
2022-05-20  9:08     ` Martin Doucha
2022-05-20  9:13       ` Petr Vorel
2022-05-20  9:21         ` Cyril Hrubis
2022-05-20 11:30           ` Petr Vorel
2022-05-20  9:22   ` Cyril Hrubis
2022-05-20 11:55     ` Petr Vorel
2022-05-20  9:05 ` [LTP] [PATCH 1/2] pty07: Resize console to the same size as before Petr Vorel
2022-05-20  9:26 ` Cyril Hrubis
2022-05-20  9:33   ` Martin Doucha
2022-05-20 11:50     ` Petr Vorel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YodY7QOisdpaI3KK@pevik \
    --to=pvorel@suse.cz \
    --cc=ltp@lists.linux.it \
    --cc=mdoucha@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.