03-14-2011
The only time I received an isatty related error was with a few interactive types of programs like top. It said that the tty check failed, just as you said some of them would. passwd on the other hand launches well and requests for some input. getting it this input and retrieving the next output is proving to be the challenge. I hope you are not saying that this method completely cannot work with interactive programs. If it is possible, I would be grateful for some pointers on how to go about it.
5 More Discussions You Might Find Interesting
1. Linux
hello,
can any body tell how to use terminal emulator....
i want to check he serial port communication with the help of that terminal emmulator....
also tell me how to open terminal emmulator.....and how to configure it........and how to use it...
I am using fedora core 6..... (1 Reply)
Discussion started by: arunchaudhary19
1 Replies
2. UNIX for Advanced & Expert Users
hi all,
i'm trying to write a unix system from scratch (not re-writing the kernel)
does anyone have information about that? tips and stuff...?i would appreciate every help,
thnks :) (9 Replies)
Discussion started by: elzalem
9 Replies
3. UNIX for Advanced & Expert Users
Hey,
Had anyone tried with writing a new FS - file system ( whether its useful or not, that doesn't matter ) ?
I tried one couple of years ago, but that was a fatal failure :( and can't continue working on it since then. :(
Anybody got some experience with writing file system from the... (4 Replies)
Discussion started by: matrixmadhan
4 Replies
4. Solaris
Hello Expert! :b:
Question for you guys, Can anyone tell me how to use terminal emulator on Windows XP to view Solaris config? I have no idea on Solaris and the only thing I could do is to boot it up. Honestly, I have given a tasked to delete all the files and some necessary memory information... (2 Replies)
Discussion started by: katsloko
2 Replies
5. UNIX for Dummies Questions & Answers
Hi, I was just wondering how to distinguish between the two terms:
1. Terminal emulator (vt100, vt220 and so on)
2. shell command line
Then i decided to conclude myself that these 2 are very equivalent. am I right? this actually came to my mind when I was using my HP-UX terminal.
I am... (1 Reply)
Discussion started by: messi777
1 Replies
LEARN ABOUT FREEBSD
isatty
TTYNAME(3) BSD Library Functions Manual TTYNAME(3)
NAME
ttyname, ttyname_r, isatty -- get name of associated terminal (tty) from file descriptor
LIBRARY
Standard C Library (libc, -lc)
SYNOPSIS
#include <unistd.h>
char *
ttyname(int fd);
int
ttyname_r(int fd, char *buf, size_t len);
int
isatty(int fd);
DESCRIPTION
These functions operate on file descriptors for terminal type devices.
The isatty() function determines if the file descriptor fd refers to a valid terminal type device.
The ttyname() function gets the related device name of a file descriptor for which isatty() is true.
The ttyname() function returns the name stored in a static buffer which will be overwritten on subsequent calls. The ttyname_r() function
takes a buffer and length as arguments to avoid this problem.
RETURN VALUES
The isatty() function returns 1 if fd refers to a terminal type device; otherwise, it returns 0 and may set errno to indicate the error. The
ttyname() function returns the null terminated name if the device is found and isatty() is true; otherwise a NULL pointer is returned. The
ttyname_r() function returns 0 if successful. Otherwise an error number is returned.
ERRORS
These functions may fail if:
[EBADF] The fd argument is not a valid file descriptor.
[ENOTTY] The file associated with fd is not a terminal.
Additionally, ttyname_r() may fail if:
[ERANGE] The bufsize argument is smaller than the length of the string to be returned.
SEE ALSO
fdevname(3), ptsname(3), tcgetattr(3), tty(4)
HISTORY
The isatty() and ttyname() functions appeared in Version 7 AT&T UNIX. The ttyname_r() function appeared in FreeBSD 6.0.
BSD
July 18, 2014 BSD