Skip to content

stdin -> docker exec is closed too early #82

Description

@moul
No description provided.

Activity

  1. self-assigned this
    on Jul 15, 2016
  2. moul commented on Jul 15, 2016

    @moul
    OwnerAuthor

    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 the docker exec
    • then we can see 25 lines with a $ at the end, which are the result of the cat -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$
  3. moul commented on Jul 15, 2016

    @moul
    OwnerAuthor

    @QuentinPerez, I will need some help :p

  4. modified the milestone: v1.3.0 on Jul 15, 2016
  5. moul commented on Jul 19, 2016

    @moul
    OwnerAuthor

    Partially fixed :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions