[ros-users] Nodes with root privileges

Blaise Gassend blaise at willowgarage.com
Fri Mar 26 05:02:49 UTC 2010


> So what I have done is after building the node a script will chown
> root:root the node, and chmod +s the node.  The node functions
> properly and as expected when it accesses the hardware, until I start
> using callbacks for messages.  If calls are made to <sys/io.h> from
> within a message callback the program segfaults, but if calls are made
> to <sys/io.h> elsewhere in the program there are no problems.

Have you tried calling iopl from the callback, or just in/out commands?
That way you could guarantee that you are calling it from the right
thread. Probably not what you want to do in production, but I think it
will help you diagnose what is wrong.

What does your threading model look like? Do you have multiple threads?




More information about the ros-users mailing list