Philipp Keller wrote: > Thank you Jan. > > As to your answer: > That must be a different issue. Check /proc/xenomai/rtdm/open_fildes for > any leftover (CAN) file descriptor. Note that rt_dev_close() can fail if > the descriptor is busy. And such thing can happen if you simply kill the > task that currently blocks on a CAN device e.g. > > The correct ordering is therefore: close the sockets, catch the failure > in the blocking threads, and make them self-terminate. Granted, note the > most comfortable situation, but I'm sure we can improve it in the future > (e.g. via auto-cleanup also for RTDM file descriptors). > > I am actually doing that quite defensively I think, as you see in the > code snippet: [...]
That code looks sane (for UP systems), and you are dumping all errors so that I can assume a non-closed socket would have been detected. So we now need more information on your precise issues, which are still two as I see it: rt_task_delete(&main) (actually a non-issue as I explained) and the failing re-opening of the CAN device. What error codes do you get? Can you derive a simple demo program that exposes the error and can be analysed by us? Jan PS: Yet another lacking reply-to-all...
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Xenomai-help mailing list [email protected] https://mail.gna.org/listinfo/xenomai-help
