On Sat, Dec 18, 2004 at 02:17:19AM +1100, Sam Watkins wrote......
> On Mon, Dec 20, 2004 at 06:54:01AM -0500, Kevin Coyner wrote:
> > /usr/bin/br: error: [Input/output error] ioctl
>
> if you're not sure what user it's running as, try running "whoami" in
> the crontab. although if it's root's crontab it should definitely be
> running as root.
Tried this, and got 'root', which is what we would have expected.
> I assume if you run this progam yourself it doesn't give that error.
You assume correctly. If running myself (non-root user) from crontab or
from the CLI, I don't get the error.
> Trying putting "strace -f br" or "ltrace -Sf br" instead of "br" in cron
> and see what it's doing when it fails.
I ran it with strace, and here's a brief snippet of what appears to be
the relevant output:
open("/dev/firecracker", O_RDONLY|O_NONBLOCK) = 3
ioctl(3, TIOCMGET, [TIOCM_DTR|TIOCM_RTS|0x4000]) = 0
ioctl(3, TIOCMBIS, [TIOCM_DTR|TIOCM_RTS]) = 0
gettimeofday({1103564221, 329195}, NULL) = 0
gettimeofday({1103564221, 329245}, NULL) = 0
gettimeofday({1103564221, 329294}, NULL) = 0
gettimeofday({1103564221, 329343}, NULL) = 0
.....
The gettimeofday() stuff goes on and on and on ...
So it seems to be a problem when root tries to open up the serial port
(via /dev/firecracker) and execute the 'gettimeofday' function.
I've got the crontab running successfully now as another non-root user,
but I'm still kind of curious as to what all this means.
Thanks
Kevin
--
Kevin Coyner GnuPG key: 1024D/8CE11941 http://rustybear.com/pubkey.php
Attachment:
signature.asc
Description: Digital signature