list of threads with same session_label
Hi,
we use Xenomai's tuneable "session_name" to set the same session of our threads.
to do this, we used your example "Adding your own setup code" described in "application-setup-and-init" and attach this lib to the application.
It works fine.
My Question:
How can I list all threads that live in the same session?
With best regards,
Alexander Hänel-Baas
Quoted 9 lines · Alexander
Hi,
we use Xenomai's tuneable "session_name" to set the same session of our threads.
to do this, we used your example "Adding your own setup code" described in "application-setup-and-init" and attach this lib to the application.
It works fine.My Question:
How can I list all threads that live in the same session?
Assuming alchemy is your API, enable the user-space registry with --enable-registry when configuring. Your application will automatically maintain /var/run/xenomai/<user>/<session>/alchemy/tasks. Reading from this file should give you the information needed.
The kernel side is not aware of the session mechanism, so you won't find any reference to it under the /proc/xenomai hierarchy.
Signature · 1 line
Philippe.
Hi Philippe,
thanks for your response.
Quoted 2 lines
Assuming alchemy is your API, enable the user-space registry with --enable-registry when configuring. Your application will automatically maintain /var/run/xenomai/<user>/<session>/alchemy/tasks. Reading from this file should give you the information needed.
Ok fine, now we have Xenomai configured with --enable-registry, and we can see the task entrees in /var/run/xenomai. Thanks for that.
However, we need to start the program as none root user. I remember we had a post from January (xenomai.allowed_group=<gid>). In this post, you give me a hint of the commit #cf21e8062959. In this commit, you explain how to: "copperplate: enable group-based access to sessions".
All 5 steps are already done.
Only step 2 is not clearly. Is "/dev/rtdm" correct ore did you mean "/dev/fuse"?
As root user, it works pretty.
But when we start the program as none root user:
setuidgid admin:staff sd3Dnc --session SD3/staff
we get:
fusermount: mount failed: Operation not permitted
0"124.925| WARNING: [main] can't mount registry onto /var/run/xenomai/admin/SD3/system 0"125.310| BUG in copperplate_bootstrap_internal(): [main] initialization failed, EPERM
I am not sure what my problem is. Maybe fuse, xenomai or permissions. The error comes from fuse and means that fuse can't mount /var/run/xenomai/admin. Why? Or is the call of fuse wrong.
Can you explain a little bit?
PS. staff is our xenomai group, and admin a normal user.
Permissions on /dev:
drwxr-xr-x 2 root staff 160 Jan 1 1970 rtdm
crwxrwxrwt 1 root staff 10, 229 Jan 1 01:56 fuse
ll /var/run/xenomai/
drwxr-xr-x 2 admin staff 40 Jan 1 03:41 admin
drwxr-xr-x 3 root root 60 Jan 1 02:55 root
with best regards,
Alexander