AJ Alt
01/27/2020, 10:57 PMplatform.posix.isatty
from K/N? It seems that isatty(STDIN_FILENO)
always returns 0 on my machine (calling the built binary directly, not though gradle). Calling isatty(fileno(stdout))
in the same way from a C program returns the expected values.olonho
01/28/2020, 6:26 AMnike@~/kotlin/2kotlin-native
>cat isa.kt
import platform.posix.*
fun main() {
println(isatty(STDIN_FILENO))
}
nike@~/kotlin/2kotlin-native
>./dist/bin/konanc isa.kt -o i
nike@~/kotlin/2kotlin-native
>./i.kexe
1
nike@~/kotlin/2kotlin-native
>uname -a
Darwin iMac-Nikolay.local 18.7.0 Darwin Kernel Version 18.7.0: Sat Oct 12 00:02:19 PDT 2019; root:xnu-4903.278.12~1/RELEASE_X86_64 x86_64
olonho
01/28/2020, 6:26 AMnapperley
01/28/2020, 6:57 AMKavan
01/28/2020, 8:20 AMKavan
01/28/2020, 8:25 AMAJ Alt
01/28/2020, 4:45 PMolonho
01/28/2020, 4:51 PMAJ Alt
01/28/2020, 4:55 PM_isatty(STDIN_FILENO)
, and still only get 0olonho
01/28/2020, 4:58 PMAJ Alt
01/28/2020, 5:00 PMisatty
is returning 1 when they expect 0. I'm experiencing the opposite case.AJ Alt
01/28/2020, 5:02 PM