diff --git a/bindings/java/src/jni/javasigar.c b/bindings/java/src/jni/javasigar.c index dbed606c..d986812d 100644 --- a/bindings/java/src/jni/javasigar.c +++ b/bindings/java/src/jni/javasigar.c @@ -939,6 +939,12 @@ JNIEXPORT jstring SIGAR_JNI(Sigar_getFQDN) #include "sigar_getline.h" +JNIEXPORT jboolean SIGAR_JNI(util_Getline_isatty) +(JNIEnv *env, jclass cls) +{ + return isatty(fileno(stdin)) ? JNI_TRUE : JNI_FALSE; +} + JNIEXPORT jstring SIGAR_JNI(util_Getline_getline) (JNIEnv *env, jobject sigar_obj, jstring prompt) {