I have a Perl script running in an AIX box.
The script tries to open a file from a certain directory and it fails to read the file because file has no read permission, but I get a different error saying inappropriate ioctl for device
.
Shouldn't it say something like no read permissions for file
or something similar?
What does this inappropriate ioctl for device
message mean?
How can I fix it?
EDIT: This is what I found when I did strace
.
open("/local/logs/xxx/xxxxServer.log", O_WRONLY|O_CREAT|O_APPEND|O_LARGEFILE, 0666) = 4 _llseek(4, 0, [77146], SEEK_END) = 0 ioctl(4, SNDCTL_TMR_TIMEBASE or TCGETS, 0xbffc14f8) = -1 ENOTTY (Inappropriate ioctl for device)