* sensors strace
@ 2005-05-19 6:24 Jean Delvare
2005-05-19 6:24 ` Greg KH
0 siblings, 1 reply; 2+ messages in thread
From: Jean Delvare @ 2005-05-19 6:24 UTC (permalink / raw)
To: lm-sensors
Hi all,
As I was investigating the long running "sensors: run as root?" issue, I
found something strange. There is a mysterious sysctl call before and
after reading the /etc/sensors.conf file. See:
open("/etc/sensors.conf", O_RDONLY) = 3
(...)
ioctl(3, TCGETS, 0xbfffe6f8) = -1 ENOTTY (Inappropriate ioctl
for device)
(...)
ioctl(3, TCGETS, 0xbfffe6c8) = -1 ENOTTY (Inappropriate ioctl
for device)
I was unable to find where in the code we do that, but I suspect that
this is in lex/yacc generated code (which is simply unreadable). Does
anyone have an explanation? What's that "TCGETS" supposed to do, and why
is it failing?
Also, the configuration file is never closed. I guess it could be, once
the parsing has been done, can't it?
--
Jean Delvare
http://www.ensicaen.ismra.fr/~delvare/
^ permalink raw reply [flat|nested] 2+ messages in thread* sensors strace
2005-05-19 6:24 sensors strace Jean Delvare
@ 2005-05-19 6:24 ` Greg KH
0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2005-05-19 6:24 UTC (permalink / raw)
To: lm-sensors
On Sun, Nov 23, 2003 at 06:34:26PM +0100, Jean Delvare wrote:
> Hi all,
>
> As I was investigating the long running "sensors: run as root?" issue, I
> found something strange. There is a mysterious sysctl call before and
> after reading the /etc/sensors.conf file. See:
>
> open("/etc/sensors.conf", O_RDONLY) = 3
> (...)
> ioctl(3, TCGETS, 0xbfffe6f8) = -1 ENOTTY (Inappropriate ioctl
> for device)
> (...)
> ioctl(3, TCGETS, 0xbfffe6c8) = -1 ENOTTY (Inappropriate ioctl
> for device)
>
> I was unable to find where in the code we do that, but I suspect that
> this is in lex/yacc generated code (which is simply unreadable). Does
> anyone have an explanation? What's that "TCGETS" supposed to do, and why
> is it failing?
It gets the current termios settings for the device. It should only
succeed if called on a serial port node. I have no idea why it's being
called on a file handle that is not a serial port. It's possibly a
thing that glibc does to determine what kind of file it has opened up.
greg k-h
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-05-19 6:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-19 6:24 sensors strace Jean Delvare
2005-05-19 6:24 ` Greg KH
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.