New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
console tarantool ignores -i flag in case stdin is not a tty. #5064
Comments
Reproducer:
Expected:
Not sure what behaviour should be for |
OKriw
pushed a commit
that referenced
this issue
Jun 16, 2020
When using interactive console(stdin) instead of \set delimiter <delimiter> with "\", "\" in the end if line can be used. Works on server/client side. Local console is impossible to test with a pipe or tatantool interactive mode. The problem with interactive mode (-i) is that the flag that sets it, does not influence the isatty() check, while startup script is executed (#5064). To overload this check end test the local console isatty lib was added.
OKriw
pushed a commit
that referenced
this issue
Jun 16, 2020
When using interactive console(stdin) instead of \set delimiter <delimiter> with "\", "\" in the end if line can be used. Works on both server/client side. Local console is impossible to test with a pipe or tatantool interactive mode. The problem with interactive mode (-i) is that the flag that sets it, does not influence the isatty() check, while startup script is executed (#5064). To overload this check and test the local console isatty lib was added.
OKriw
pushed a commit
that referenced
this issue
Jun 30, 2020
When using interactive console(stdin) instead of \set delimiter <delimiter> with "\", "\" in the end if line can be used. Works on both server/client side. Local console is impossible to test with a pipe or tatantool interactive mode. The problem with interactive mode (-i) is that the flag that sets it, does not influence the isatty() check, while startup script is executed (#5064). To overload this check and test the local console isatty lib was added.
OKriw
pushed a commit
that referenced
this issue
Jul 8, 2020
When using interactive console one has to explicitly set delimiter different from newline ('\n') symbol before this patch. The changes make possible to split console input into multiple lines via backslash ('\\') at the end of the line instead of setting a delimiter. Local console is impossible to test with a pipe or tatantool interactive mode. The problem with interactive mode (-i) is that the flag that sets it, does not influence the isatty() check, while startup script is executed (#5064). To overload this check and test the local console patch adds isatty lib. Closes #4317
OKriw
pushed a commit
that referenced
this issue
Jul 9, 2020
When using interactive console(stdin) instead of \set delimiter <delimiter> with "\", "\" in the end if line can be used. Works on both server/client side. Local console is impossible to test with a pipe or tarantool interactive mode. The problem with interactive mode (-i) is that the flag that sets it, does not influence the isatty() check, while startup script is executed (#5064). To overload this check and test the local console isatty lib was added.
Lord-KA
pushed a commit
to Lord-KA/tarantool
that referenced
this issue
Jul 3, 2022
When using interactive console(stdin) instead of \set delimiter <delimiter> with "\", "\" in the end if line can be used. Works on both server/client side. Local console is impossible to test with a pipe or tarantool interactive mode. The problem with interactive mode (-i) is that the flag that sets it, does not influence the isatty() check, while startup script is executed (tarantool#5064). To overload this check and test the local console isatty lib was added.
Lord-KA
added a commit
to Lord-KA/tarantool
that referenced
this issue
Jul 4, 2022
Local console is impossible to test with a pipe or tarantool interactive mode. The problem with interactive mode (-i) is that the flag that sets it, does not influence the isatty() check, while startup script is executed (tarantool#5064). To overload this check and test the local console isatty lib was added. Co-Authored-By: Olga <arkholga@tarantool.org> Closes tarantool#4317 @TarantoolBot document Title: introduce line carrying slash When using interactive console(stdin) instead of `\set delimiter "\"`, slash at the end of the line can be used. Works on both server and client side. Consider the example: ``` tarantool> a = 10 \ > + 12 --- ... tarantool> a --- - 22 ... ```
Lord-KA
added a commit
to Lord-KA/tarantool
that referenced
this issue
Jul 4, 2022
Local console is impossible to test with a pipe or tarantool interactive mode. The problem with interactive mode (-i) is that the flag that sets it, does not influence the isatty() check, while startup script is executed (tarantool#5064). To overload this check and test the local console isatty lib was added. Co-authored-by: Olga <arkholga@tarantool.org> Closes tarantool#4317 @TarantoolBot document Title: introduce line carrying slash When using interactive console(stdin) instead of `\set delimiter "\"`, slash at the end of the line can be used. Works on both server and client side. Consider the example: ``` tarantool> a = 10 \ > + 12 --- ... tarantool> a --- - 22 ... ```
Lord-KA
added a commit
to Lord-KA/tarantool
that referenced
this issue
Jul 4, 2022
Local console is impossible to test with a pipe or tarantool interactive mode. The problem with interactive mode (-i) is that the flag that sets it, does not influence the isatty() check, while startup script is executed (tarantool#5064). To overload this check and test the local console isatty lib was added. Co-authored-by: Olga <arkholga@tarantool.org> Closes tarantool#4317 @TarantoolBot document Title: introduce line carrying slash When using interactive console(stdin) instead of `\set delimiter "\"`, slash at the end of the line can be used. Works on both server and client side. Consider the example: ``` tarantool> a = 10 \ > + 12 --- ... tarantool> a --- - 22 ... ```
Lord-KA
added a commit
to Lord-KA/tarantool
that referenced
this issue
Jul 4, 2022
Local console is impossible to test with a pipe or tarantool interactive mode. The problem with interactive mode (-i) is that the flag that sets it, does not influence the isatty() check, while startup script is executed (tarantool#5064). To overload this check and test the local console isatty lib was added. Co-authored-by: Olga <arkholga@tarantool.org> Closes tarantool#4317 @TarantoolBot document Title: introduce line carrying slash When using interactive console(stdin) instead of `\set delimiter "\"`, slash at the end of the line can be used. Works on both server and client side. Consider the example: ``` tarantool> a = 10 \ > + 12 --- ... tarantool> a --- - 22 ... ``` FreeBSD treats escaped chars differently than linux, thus when using printf the escaping must be escaped too. For example: ```BSD ~ printf "local a = 0 \\\\\nfor i = 1, 10 do\\\na = a + i\\\nend \\\\\nprint(a)" | | LD_PRELOAD=./test/libisatty.so ./src/tarantool ``` instead of ```linux ~ printf "local a = 0 \\\nfor i = 1, 10 do\na = a + i\nend \\\nprint(a)" | | LD_PRELOAD=./test/libisatty.so ./src/tarantool ```
Lord-KA
added a commit
to Lord-KA/tarantool
that referenced
this issue
Jul 4, 2022
Local console is impossible to test with a pipe or tarantool interactive mode. The problem with interactive mode (-i) is that the flag that sets it, does not influence the isatty() check, while startup script is executed (tarantool#5064). To overload this check and test the local console isatty lib was added. Co-authored-by: Olga <arkholga@tarantool.org> Closes tarantool#4317 @TarantoolBot document Title: introduce line carrying slash When using interactive console(stdin) instead of `\set delimiter "\"`, slash at the end of the line can be used. Works on both server and client side. Consider the example: ``` tarantool> a = 10 \ > + 12 --- ... tarantool> a --- - 22 ... ``` FreeBSD treats escaped chars differently than linux, thus when using printf the escaping must be escaped too. For example: ```BSD ~ printf "local a = 0 \\\\\nfor i = 1, 10 do\\\na = a + i\\\nend \\\\\nprint(a)" | | LD_PRELOAD=./test/libisatty.so ./src/tarantool ``` instead of ```linux ~ printf "local a = 0 \\\nfor i = 1, 10 do\na = a + i\nend \\\nprint(a)" | | LD_PRELOAD=./test/libisatty.so ./src/tarantool ```
Lord-KA
added a commit
to Lord-KA/tarantool
that referenced
this issue
Jul 4, 2022
Local console is impossible to test with a pipe or tarantool interactive mode. The problem with interactive mode (-i) is that the flag that sets it, does not influence the isatty() check, while startup script is executed (tarantool#5064). To overload this check and test the local console isatty lib was added. Co-authored-by: Olga Arkhangelskaia <arkholga@tarantool.org> Closes tarantool#4317 @TarantoolBot document Title: introduce line carrying slash When using interactive console(stdin) instead of `\set delimiter "\"`, slash at the end of the line can be used. Works on both server and client side. Consider the example: ``` tarantool> a = 10 \ > + 12 --- ... tarantool> a --- - 22 ... ``` FreeBSD treats escaped chars differently than linux, thus when using printf the escaping must be escaped too. For example: ```BSD ~ printf "local a = 0 \\\\\nfor i = 1, 10 do\\\na = a + i\\\nend \\\\\nprint(a)" | | LD_PRELOAD=./test/libisatty.so ./src/tarantool ``` instead of ```linux ~ printf "local a = 0 \\\nfor i = 1, 10 do\na = a + i\nend \\\nprint(a)" | | LD_PRELOAD=./test/libisatty.so ./src/tarantool ```
Lord-KA
added a commit
to Lord-KA/tarantool
that referenced
this issue
Jul 4, 2022
The interactive mode has been overruled by isatty check and is no more. Now results of another command can be handled by tarantool. For example: ``` $ echo 42 | tarantool -i Tarantool 2.5.0-130-ge3cf64a6c type 'help' for interactive help tarantool> 42 --- - 42 ... tarantool> $ ``` NO_DOC=bugfix Closes tarantool#5064
Lord-KA
added a commit
to Lord-KA/tarantool
that referenced
this issue
Jul 4, 2022
The interactive mode has been overruled by isatty check and is no more. Now results of another command can be handled by tarantool. For example: ``` $ echo 42 | tarantool -i Tarantool 2.5.0-130-ge3cf64a6c type 'help' for interactive help tarantool> 42 --- - 42 ... tarantool> $ ``` NO_DOC=bugfix Closes tarantool#5064
Lord-KA
added a commit
to Lord-KA/tarantool
that referenced
this issue
Jul 6, 2022
When using interactive console(stdin) instead of `\set delimiter '\'`, slash at the end of the line can be used. Works on both server and client side. Local console is impossible to test with a pipe or tarantool interactive mode. The problem with interactive mode (-i) is that the flag that sets it, does not influence the isatty() check, while startup script is executed (tarantool#5064). To overload this check and test the local console isatty lib was added. Co-authored-by: Olga Arkhangelskaia <arkholga@tarantool.org> Closes tarantool#4317 @TarantoolBot document Title: introduce line carrying slash Now we can use multiline commands with lines ending with '\' by default. Works only without a set delimiter. Consider the example: ``` tarantool> a = 10 \ > + 12 --- ... tarantool> a --- - 22 ... ```
Lord-KA
added a commit
to Lord-KA/tarantool
that referenced
this issue
Jul 7, 2022
The interactive mode has been overruled by isatty check and is no more. Now results of another command can be handled by tarantool. For example: ``` $ echo 42 | tarantool -i Tarantool 2.5.0-130-ge3cf64a6c type 'help' for interactive help tarantool> 42 --- - 42 ... tarantool> $ ``` NO_DOC=bugfix Closes tarantool#5064
Lord-KA
added a commit
to Lord-KA/tarantool
that referenced
this issue
Jul 7, 2022
Inspired by tarantoolgh-5064, that breaks the previous version of the test on opensuse. When using `io.popen:write()` on tarantool with `-i` flag, it failed to run the command on opensuse. Needed for tarantool#5064 NO_DOC=test fix NO_TEST=test fix NO_CHANGELOG=test fix
Lord-KA
added a commit
to Lord-KA/tarantool
that referenced
this issue
Jul 7, 2022
The interactive mode has been overruled by isatty check and is no more. Now results of another command can be handled by tarantool. For example: ``` $ echo 42 | tarantool -i Tarantool 2.5.0-130-ge3cf64a6c type 'help' for interactive help tarantool> 42 --- - 42 ... tarantool> $ ``` Closes tarantool#5064 NO_DOC=bugfix
Lord-KA
added a commit
to Lord-KA/tarantool
that referenced
this issue
Jul 13, 2022
Inspired by tarantoolgh-5064, that breaks the previous version of the test on opensuse. When using `io.popen:write()` on tarantool with `-i` flag, it failed to run the command on opensuse. It happend because before tarantoolgh-5064 patch it used to employ `luaL_loadfile()` that interprets EOF as the end of the command, while when it is loaded as a string opensuse expects it to end with '\'. Needed for tarantool#5064 NO_DOC=test fix NO_TEST=test fix NO_CHANGELOG=test fix
Lord-KA
added a commit
to Lord-KA/tarantool
that referenced
this issue
Jul 13, 2022
The interactive mode has been overruled by isatty check and is no more. Now results of another command can be handled by tarantool. Before the patch: ``` $ echo 42 | tarantool -i LuajitError: stdin:1: unexpected symbol near '42' fatal error, exiting the event loop ``` After the patch: ``` $ echo 42 | tarantool -i Tarantool 2.5.0-130-ge3cf64a6c type 'help' for interactive help tarantool> 42 --- - 42 ... tarantool> $ ``` Closes tarantool#5064 NO_DOC=bugfix
Lord-KA
added a commit
to Lord-KA/tarantool
that referenced
this issue
Jul 13, 2022
Inspired by tarantoolgh-5064, that breaks the previous version of the test on opensuse. When using `io.popen:write()` on tarantool with `-i` flag, it failed to run the command on opensuse. This happened because before tarantoolgh-5064 patch it used to employ `luaL_loadfile()` that interprets EOF as the end of the command, while when it is loaded as a string opensuse expects it to end with '\'. Needed for tarantool#5064 NO_DOC=test fix NO_TEST=test fix NO_CHANGELOG=test fix
Lord-KA
added a commit
to Lord-KA/tarantool
that referenced
this issue
Jul 13, 2022
The interactive mode has been overruled by isatty check and is no more. Now results of another command can be handled by tarantool. Before the patch: ``` $ echo 42 | tarantool -i LuajitError: stdin:1: unexpected symbol near '42' fatal error, exiting the event loop ``` After the patch: ``` $ echo 42 | tarantool -i Tarantool 2.5.0-130-ge3cf64a6c type 'help' for interactive help tarantool> 42 --- - 42 ... tarantool> $ ``` Closes tarantool#5064 NO_DOC=bugfix
Lord-KA
added a commit
to Lord-KA/tarantool
that referenced
this issue
Jul 14, 2022
Inspired by tarantoolgh-5064, that breaks the previous version of the test on openSUSE. When using `io.popen:write()` on tarantool with `-i` flag, it failed to run the command on openSUSE. This happened because before tarantoolgh-5064 patch it used to employ `luaL_loadfile()` that interprets EOF as the end of the command, while when it is loaded as a string openSUSE expects it to end with '\n'. Needed for tarantool#5064 NO_DOC=test fix NO_TEST=test fix NO_CHANGELOG=test fix
Lord-KA
added a commit
to Lord-KA/tarantool
that referenced
this issue
Jul 14, 2022
The interactive mode has been overruled by isatty check and is no more. Now results of another command can be handled by tarantool. Before the patch: ``` $ echo 42 | tarantool -i LuajitError: stdin:1: unexpected symbol near '42' fatal error, exiting the event loop ``` After the patch: ``` $ echo 42 | tarantool -i Tarantool 2.5.0-130-ge3cf64a6c type 'help' for interactive help tarantool> 42 --- - 42 ... tarantool> $ ``` Closes tarantool#5064 NO_DOC=bugfix
Lord-KA
added a commit
to Lord-KA/tarantool
that referenced
this issue
Jul 14, 2022
The interactive mode has been ignored when stdin was not a tty and is no more. Now results of another command can be handled by tarantool. Before the patch: ``` $ echo 42 | tarantool -i LuajitError: stdin:1: unexpected symbol near '42' fatal error, exiting the event loop ``` After the patch: ``` $ echo 42 | tarantool -i Tarantool 2.5.0-130-ge3cf64a6c type 'help' for interactive help tarantool> 42 --- - 42 ... tarantool> $ ``` Closes tarantool#5064 NO_DOC=bugfix
Lord-KA
added a commit
to Lord-KA/tarantool
that referenced
this issue
Jul 20, 2022
The interactive mode has been ignored when stdin was not a tty and is no more. Now results of another command can be handled by tarantool. Before the patch: ``` $ echo 42 | tarantool -i LuajitError: stdin:1: unexpected symbol near '42' fatal error, exiting the event loop ``` After the patch: ``` $ echo 42 | tarantool -i Tarantool 2.5.0-130-ge3cf64a6c type 'help' for interactive help tarantool> 42 --- - 42 ... ``` Closes tarantool#5064 NO_DOC=bugfix
Lord-KA
added a commit
to Lord-KA/tarantool
that referenced
this issue
Aug 1, 2022
Inspired by tarantoolgh-5064, that breaks the previous version of the test on openSUSE. When using `io.popen:write()` on tarantool with `-i` flag, it failed to run the command on openSUSE. This happened because before tarantoolgh-5064 patch it used to employ `luaL_loadfile()` that interprets EOF as the end of the command, while when it is loaded as a string openSUSE expects it to end with '\n'. Needed for tarantool#5064 NO_DOC=test fix NO_TEST=test fix NO_CHANGELOG=test fix
Lord-KA
added a commit
to Lord-KA/tarantool
that referenced
this issue
Aug 1, 2022
The interactive mode has been ignored when stdin was not a tty and is no more. Now results of another command can be handled by tarantool. Before the patch: ``` $ echo 42 | tarantool -i LuajitError: stdin:1: unexpected symbol near '42' fatal error, exiting the event loop ``` After the patch: ``` $ echo 42 | tarantool -i Tarantool 2.5.0-130-ge3cf64a6c type 'help' for interactive help tarantool> 42 --- - 42 ... ``` Closes tarantool#5064 NO_DOC=bugfix
Lord-KA
added a commit
to Lord-KA/tarantool
that referenced
this issue
Aug 1, 2022
Inspired by tarantoolgh-5064, that breaks the previous version of the test on openSUSE. When using `io.popen:write()` on tarantool with `-i` flag, it failed to run the command on openSUSE. This happened because before tarantoolgh-5064 patch it used to employ `luaL_loadfile()` that interprets EOF as the end of the command, while when it is loaded as a string openSUSE expects it to end with '\n'. Needed for tarantool#5064 NO_DOC=test fix NO_TEST=test fix NO_CHANGELOG=test fix
Lord-KA
added a commit
to Lord-KA/tarantool
that referenced
this issue
Aug 1, 2022
The interactive mode has been ignored when stdin was not a tty and is no more. Now results of another command can be handled by tarantool. Before the patch: ``` $ echo 42 | tarantool -i LuajitError: stdin:1: unexpected symbol near '42' fatal error, exiting the event loop ``` After the patch: ``` $ echo 42 | tarantool -i Tarantool 2.5.0-130-ge3cf64a6c type 'help' for interactive help tarantool> 42 --- - 42 ... ``` Closes tarantool#5064 NO_DOC=bugfix
Lord-KA
added a commit
to Lord-KA/tarantool
that referenced
this issue
Aug 3, 2022
The interactive mode has been ignored when stdin was not a tty and is no more. Now results of another command can be handled by tarantool. Before the patch: ``` $ echo 42 | tarantool -i LuajitError: stdin:1: unexpected symbol near '42' fatal error, exiting the event loop ``` After the patch: ``` $ echo 42 | tarantool -i Tarantool 2.5.0-130-ge3cf64a6c type 'help' for interactive help tarantool> 42 --- - 42 ... ``` Closes tarantool#5064 NO_DOC=bugfix
igormunkin
pushed a commit
that referenced
this issue
Aug 9, 2022
Inspired by gh-5064, that breaks the previous version of the test on openSUSE. When using `io.popen:write()` on tarantool with `-i` flag, it failed to run the command on openSUSE. This happened because before gh-5064 patch it used to employ `luaL_loadfile()` that interprets EOF as the end of the command, while when it is loaded as a string openSUSE expects it to end with '\n'. Needed for #5064 NO_DOC=test fix NO_TEST=test fix NO_CHANGELOG=test fix
igormunkin
pushed a commit
that referenced
this issue
Aug 9, 2022
The interactive mode has been ignored when stdin was not a tty and is no more. Now results of another command can be handled by tarantool. Before the patch: ``` $ echo 42 | tarantool -i LuajitError: stdin:1: unexpected symbol near '42' fatal error, exiting the event loop ``` After the patch: ``` $ echo 42 | tarantool -i Tarantool 2.5.0-130-ge3cf64a6c type 'help' for interactive help tarantool> 42 --- - 42 ... ``` Closes #5064 NO_DOC=bugfix
mkokryashkin
pushed a commit
to mkokryashkin/tarantool
that referenced
this issue
Sep 9, 2022
Inspired by tarantoolgh-5064, that breaks the previous version of the test on openSUSE. When using `io.popen:write()` on tarantool with `-i` flag, it failed to run the command on openSUSE. This happened because before tarantoolgh-5064 patch it used to employ `luaL_loadfile()` that interprets EOF as the end of the command, while when it is loaded as a string openSUSE expects it to end with '\n'. Needed for tarantool#5064 NO_DOC=test fix NO_TEST=test fix NO_CHANGELOG=test fix
mkokryashkin
pushed a commit
to mkokryashkin/tarantool
that referenced
this issue
Sep 9, 2022
The interactive mode has been ignored when stdin was not a tty and is no more. Now results of another command can be handled by tarantool. Before the patch: ``` $ echo 42 | tarantool -i LuajitError: stdin:1: unexpected symbol near '42' fatal error, exiting the event loop ``` After the patch: ``` $ echo 42 | tarantool -i Tarantool 2.5.0-130-ge3cf64a6c type 'help' for interactive help tarantool> 42 --- - 42 ... ``` Closes tarantool#5064 NO_DOC=bugfix
igormunkin
added
2.11
Target is 2.11 and all newer release/master branches
and removed
5sp
labels
Sep 15, 2022
ylobankov
pushed a commit
that referenced
this issue
Aug 10, 2023
The interactive mode has been ignored when stdin was not a tty and is no more. Now results of another command can be handled by tarantool. Before the patch: ``` $ echo 42 | tarantool -i LuajitError: stdin:1: unexpected symbol near '42' fatal error, exiting the event loop ``` After the patch: ``` $ echo 42 | tarantool -i Tarantool 2.5.0-130-ge3cf64a6c type 'help' for interactive help tarantool> 42 --- - 42 ... ``` Closes #5064 NO_DOC=bugfix (cherry picked from commit 9965e3f)
ylobankov
pushed a commit
that referenced
this issue
Aug 14, 2023
The interactive mode has been ignored when stdin was not a tty and is no more. Now results of another command can be handled by tarantool. Before the patch: ``` $ echo 42 | tarantool -i LuajitError: stdin:1: unexpected symbol near '42' fatal error, exiting the event loop ``` After the patch: ``` $ echo 42 | tarantool -i Tarantool 2.5.0-130-ge3cf64a6c type 'help' for interactive help tarantool> 42 --- - 42 ... ``` Closes #5064 NO_DOC=bugfix (cherry picked from commit 9965e3f)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Tarantool version:
all
OS version:
all
Bug description:
When we executing some_command | tarantool -i. -i flag will be ignored, and command will be pars not by console.
Steps to reproduce:
Will be easy to reproduce after #4317 will be fixed.
The text was updated successfully, but these errors were encountered: