io.Copy(conn, os.Stdin) do not work as expected

127 views
Skip to first unread message

李世民

unread,
Sep 19, 2024, 9:09:05 AM9/19/24
to golang-nuts

Robert Engels

unread,
Sep 19, 2024, 9:51:22 AM9/19/24
to 李世民, golang-nuts
Are you certain you are running it in a terminal that has stdin available for reading?

On Sep 19, 2024, at 8:08 AM, 李世民 <bupt...@gmail.com> wrote:


--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/c1efd91e-2815-4a6c-b450-5d47423131c4n%40googlegroups.com.

Robert Engels

unread,
Sep 19, 2024, 9:56:11 AM9/19/24
to 李世民, golang-nuts
Also, it would be simpler to not run the copy in a go routine until you verify that is working as expected. Then use wait groups to control the go routine lifecycle. 

On Sep 19, 2024, at 8:51 AM, Robert Engels <ren...@ix.netcom.com> wrote:


Reply all
Reply to author
Forward
0 new messages