/* * TermInfo.ctermid * * TermInfo.ctermid returns a pathname for the current controling terminal, * such as "/dev/tty". */ static VALUE rt_ctermid(VALUE self) { #ifdef HAVE_CTERMID char buf[L_ctermid]; return rb_str_new2(ctermid(buf)); #else return rb_str_new2("/dev/tty"); #endif }