[rescue] Understanding Err#25 ENOTTY ?

Stéphane Tsacas stephane.tsacas at gmail.com
Mon Jul 7 16:05:42 CDT 2014


On 7 July 2014 22:32, Jonathan Patschke <jp at celestrion.net> wrote:

> On Mon, 7 Jul 2014, Simon Lewis wrote:
>
>  Sorry for the delay, it must be the console am using TCSH this is the
>> only bug and its a dam pain here my full log;
>>
>> http://www.mplayer.biz/mcp.log
>>
>
>
> ioctl(5, TCGETA, 0xFFBEF0EC)                    Err#25 ENOTTY
>
> Here is your bug.  File descriptor #5 is a regular file.  You may not
> retrieve terminal attributes from an open file descriptor that does not
> refer to a serial terminal, the console, or a pty.
>
> However, if we look immediately before the open() call, we see this:
>
> stat64("/dev/pts/3", 0xFFBEF078)                = 0
>
> That would be a perfectly valid target for the ioctl().  My guess is that
> some path variable is getting re-used in the calling function, and someone
> has neglected to pass the correct path (the one previously sent to
> stat64()) to open().
>

If you look what happens immediatly after the ioctl() call, we see this :

llseek(5, 288, SEEK_SET)			= 288
read(5, " m p a t h\0\0\0 3\0\0\0".., 36)	= 36


Which is something perfectly legal for a file but not a tty.

What is printed at the end of the code (to stderr) please ?

write(3, " d e f a u l t\0 o r   1".., 328)	= 328


Thanks
s


>
> If you have funding and/or the project is particularly interesting, I'm
> sure we could work something out. :)
>
> --
> Jonathan Patschke | "Do the difficult things while they are easy and do
> Elgin, TX         |  the great things while they are small."
> USA               |                                           --Lao Tzu
>
> _______________________________________________
> rescue list - http://www.sunhelp.org/mailman/listinfo/rescue
>



-- 
Stephane
FreeDonne <http://www.freedonne.org> Join FreeDonne - Rejoignez FreeDonne.


More information about the rescue mailing list