Re: [ros-users] Nodes with root privileges

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Blaise Gassend
Date:  
To: taylor, ros-users
Subject: Re: [ros-users] Nodes with root privileges
> 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?