Exec start command: detect end of STDIN stream#472
Exec start command: detect end of STDIN stream#472marcuslinke merged 4 commits intodocker-java:masterfrom
Conversation
|
Hmm. Don't know if we can use |
|
I don't think we can use |
|
Netty devs confirmed that it's ok to add |
|
@rtimush So lets wait for a new netty release before merge this. Good job! Thanks. |
879a5e4 to
ccbad49
Compare
|
Updated to netty 4.1.0.CR3. |
Current coverage is
|
|
|
||
| // we close the writing side of the socket, but keep the read side open to transfer stdout/stderr | ||
| // unfortunately, shutdownOutput is not supported by io.netty.channel.epoll.EpollDomainSocketChannel | ||
| if (channel instanceof DuplexChannel) { |
There was a problem hiding this comment.
Maybe better throw a RuntimeException when not a DuplexChannel here?
There was a problem hiding this comment.
Actually, I can change channel type to DuplexChannel because it extends Channel and avoid type checks. Will have to cast in InetSocketInitializer and UnixDomainSocketInitializer.
There was a problem hiding this comment.
Please see the last commit
|
@rtimush OK, tested with unix socket successfully now so lets merge. |
Exec start command: detect end of STDIN stream
Fix for #471.
The fix itself is to close the write side of the socket to indicate the end of stream.
shutdownOutputis available for unix domain sockets since netty4.1.0.CR3.