[rescue] Understanding Err#25 ENOTTY ?

Jonathan Patschke jp at celestrion.net
Mon Jul 7 17:03:35 CDT 2014


On Mon, 7 Jul 2014, Stiphane Tsacas wrote:

>> 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.

That makes me think that the fd variable is being improperly reused or
that the ioctl() call is completely superfluous.

This would be much easier to diagnose with source code, as we have no idea
what the intention of the code is.

-- 
Jonathan Patschke | "Do the difficult things while they are easy and do
Elgin, TX         |  the great things while they are small."
USA               |                                           --Lao Tzu


More information about the rescue mailing list