commit fb081eb64b36a9de5a43f3d69d9e628b6eb1afc7 (HEAD -> master, origin/master)
Author: Stephen Smalley <[email protected]>
Date:   Mon Jul 10 13:03:01 2017 -0400

    open_init_pty: Do not make stdin and stdout non-blocking

    It is unclear why this was being done in the first place, and
    it has caused multiple bugs with run_init/open_init_pty usage.

    Fixes: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=863187
    Fixes: https://bugs.gentoo.org/show_bug.cgi?id=621062
    Signed-off-by: Stephen Smalley <[email protected]>

I see you fixed the issue with run_init/open_init_pty messing up with the terminals but I think it's introducing an other issue :/

FTR I found the reason why stdin/stdout were not blocking, it's a fix for this: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=474956#10

Apparently if the descriptors are closed, open_init_pty hangs, example:

./open_init_pty bash -c 'echo hello; exec >&- 2>&- <&-; sleep 1; '

Reply via email to