[rescue] Understanding Err#25 ENOTTY ?
stephane.tsacas at gmail.com
Wed Jun 25 21:11:23 CDT 2014
Le jeudi 26 juin 2014, Jonathan Katz <jon at jonworld.com> a C)crit :
> Are you running this under screen or something? ioctl() is opening a
> pty than what is stat() earlier in the program.
> Ioctl is done on file descriptor 5 : which is the one returned by the open
of the utmpx file: obviously not a tty...
The error is ignored and the file is read (3720 bytes, which are stored in
a 8192 bytes buffer previously allocated (brk(2)).
One possible interpretation of this syscalls sequence is: stat the current
user tty and check that it is the one listed near the last record of the
This can be check by looking at the record stored at the lseek() address
(using a debugger).
Sent from my mobile device. Please pardon any brevity.
Same excuse here.
> > On Jun 25, 2014, at 21:15, "Simon Lewis" <simon at mplayer.biz
> > I have been fixing up my system and I have managed to fix all of the
> apart form the one below its really got my head in a spin has anyone else
> across this one before ?
> > stat64("/dev/pts/3", 0xFFBEEF08) = 0
> > open("/var/adm/utmpx", O_RDONLY) = 5
> > fstat64(5, 0xFFBEEFF0) = 0
> > brk(0x001D9EA0) = 0
> > brk(0x001DBEA0) = 0
> > ioctl(5, TCGETA, 0xFFBEEF7C) Err#25 ENOTTY
> > read(5, "\0\0\0\0\0\0\0\0\0\0\0\0".., 8192) = 3720
> > llseek(5, 0xFFFFFFFFFFFFFE8C, SEEK_CUR) = 3348
> > close(5)
> > Thanks _______________________________________________
> > rescue list - http://www.sunhelp.org/mailman/listinfo/rescue
> rescue list - http://www.sunhelp.org/mailman/listinfo/rescue
FreeDonne <http://www.freedonne.org> Join FreeDonne - Rejoignez FreeDonne.
More information about the rescue