stdin -> docker exec is closed too early
moul opened this issue · 3 comments
moul commented
stdin -> docker exec is closed too early
moul commented
testing
server
hook script always accept the connection but sleep during two seconds to simulate some API calls etc
$ make && ./ssh2docker -V --publickey-auth-script=./examples/sleep-yes-publickey-auth-script
...
client
done: printing 50 lines in 0.5sec
result: nothing is printed
$ assh sockets flush; (for i in {1..50}; do echo $i; sleep .01; done) | ssh ubuntu@localhost -p 2222 -- cat -e; assh sockets flush
done: printing 50 lines in 5 secs
result:
- we can see 25 lines that should be the output of the buffer
- then we can see 25 lines without '$' at the end of the line, which are the 25 buffered lines, sent in one-shot to the
cat -e
in thedocker exec
- then we can see 25 lines with a
$
at the end, which are the result of thecat -e
on the buffered lines - and finally, we can see the rest of the lines treated line by line by the cat -e, without buffering
$ assh sockets flush; (for i in {1..50}; do echo $i; sleep .1; done) | ssh ubuntu@localhost -p 2222 -- cat -e; assh sockets flush
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
1$
2$
3$
4$
5$
6$
7$
8$
9$
10$
11$
12$
13$
14$
15$
16$
17$
18$
19$
20$
21$
22$
23$
24$
25$
26$
27
27$
28
28$
29
29$
30
30$
31
31$
32
32$
33
33$
34
34$
35
35$
36
36$
37
37$
38
38$
39
39$
40
40$
41
41$
42
42$
43
43$
44
44$
45
45$
46
46$
47
47$
48
48$
49
49$
50
50$
moul commented
@QuentinPerez, I will need some help :p
moul commented
Partially fixed :)