deleting a left over heap (shared memory segment)
Hi,
I was wondering if there was a command line method for deleting left over heaps (i.e., those that were not properly deleted with a call to rt_heap_delete()) from /proc/xenomai/registry/native/heaps.
Just a simple rm command (as root) yields the following:
# rm -f myshmem cannot remove `myshmem': Operation not permitted
Thanks in advance for any help/insight,
Dan
Quoted 11 lines · Dan
Hi,
I was wondering if there was a command line method for deleting left over heaps (i.e., those that were not properly deleted with a call to
rt_heap_delete()) from/proc/xenomai/registry/native/heaps.Just a simple rm command (as root) yields the following:
# rm -f myshmem cannot remove `myshmem': Operation not permitted
For the moment, there is way to remove lingering native API objects from the /proc interface. On the other hand, the RTDM API allows this for some of its objects by writing a magic value to the proper /proc entry, and we might use the same technique to provide this feature to the native one.
Quoted 8 lines
Thanks in advance for any help/insight,
Dan_______________________________________________
Xenomai-help mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-help
Signature · 1 line
Philippe.
Quoted 8 lines · Philippe Gerum
Quoted 6 lines · Dan
Hi,
I was wondering if there was a command line method for deleting left over heaps (i.e., those that were not properly deleted with a call to
rt_heap_delete()) from/proc/xenomai/registry/native/heaps.
Quoted 7 lines
Quoted 5 lines
Just a simple rm command (as root) yields the following:
# rm -f myshmem cannot remove `myshmem': Operation not permittedFor the moment, there is
+ no
way to remove lingering native API objects from
Quoted 12 lines
the /proc interface. On the other hand, the RTDM API allows this for some of its objects by writing a magic value to the proper /proc entry, and we might use the same technique to provide this feature to the native one.
Quoted 8 lines
Thanks in advance for any help/insight,
Dan_______________________________________________
Xenomai-help mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-help
Signature · 1 line
Philippe.
Quoted 7 lines · Philippe Gerum
Quoted 6 lines · Dan
Hi,
I was wondering if there was a command line method for deleting left over heaps (i.e., those that were not properly deleted with a call to
rt_heap_delete()) from/proc/xenomai/registry/native/heaps.
Quoted 7 lines
Quoted 5 lines
Just a simple rm command (as root) yields the following:
# rm -f myshmem cannot remove `myshmem': Operation not permittedFor the moment, there is way to remove lingering native API objects from
^^^
no?!Quoted 4 lines
the /proc interface. On the other hand, the RTDM API allows this for some of its objects by writing a magic value to the proper /proc entry, and we might use the same technique to provide this feature to the native one.
Err, before adding to much stuff in this style (I'm allowed to diss it, I introduced it ;) ), I would rather suggest to start thinking about a scalable(!) cleanup hook for kernel objects.
We would need, e.g., per-process ownership of things like IPC objects or RTDM devices instances. Then we could simply walk the chain on cleanup, preferable in Linux context. This is a concept I already implemented in an experimental skin. If this robustness should add too much overhead (but I don't think so), we could make it optional. RTDM is already prepared for it ("forced closure")!
Jan