Windows vs Linux ReadString

69 views
Skip to first unread message

wallan...@gmail.com

unread,
Jul 20, 2019, 4:48:23 PM7/20/19
to golang-nuts
Guys....

I started a go project on windows that leveraged readstring to read command line input.  It blocked on Windows.  I just ran my code on Linux and the readstring does not block at all.  Can someone explain this to me?

Thanks in advance,
Allan

Ian Lance Taylor

unread,
Jul 20, 2019, 4:52:39 PM7/20/19
to wallan...@gmail.com, golang-nuts
On Sat, Jul 20, 2019 at 1:48 PM <wallan...@gmail.com> wrote:
>
> I started a go project on windows that leveraged readstring to read command line input. It blocked on Windows. I just ran my code on Linux and the readstring does not block at all. Can someone explain this to me?

We will be able to help you better if you show us your code and tell
us precisely what you did.

Ian

Allan Edwards

unread,
Jul 20, 2019, 9:15:12 PM7/20/19
to golang-nuts
Wow, thanks for responding guys.  So I ran my exe on linux without goland and bam the readstring blocked as needed.  For some reason the ReadString call is not blocking  inside of goland.  It seems like a great IDE but I found a weird bug.  On the Windows side the ReadString blocks inside of golandon Windows.  It just does not work correctly on Linux.

Michael Jones

unread,
Jul 20, 2019, 10:03:10 PM7/20/19
to Allan Edwards, golang-nuts
show some code.

--
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/675c8964-f2eb-475b-b042-20e01af50e99%40googlegroups.com.


--
Michael T. Jones
michae...@gmail.com
Reply all
Reply to author
Forward
0 new messages