×

INDI Library v2.0.6 is Released (02 Feb 2024)

Bi-monthly release with minor bug fixes and improvements

Driver process initialize function override (INDI::CCD)

  • Posts: 10
  • Thank you received: 2
Hi,

i've been playing with developing a new INDI driver for my Nightscape 8300 CCD.

Is there a standard method in DefaultDevice or CCD that gets called only on process start, before Connect()? I know initProperties() is called before Connect() but that seems to be for property values, not general initialization (and I don't know if it could ever be called more than once during a driver process's lifetime).

I know it's a weird request but I would like to be able to make my driver setuid root (I know, I know) and drop root privileges ASAP after start.
This is done to with the process priorities and realtime scheduling (not permitted as a normal user) .

I've gotten around the ability to only read USB devices as root by setting up correct udev rules on Linux do change the device group ownership, but nice-ing my driver to -20 with setpriority() is a little more difficult, as this would mean i need to give my indi user realtime limits and I'd prefer to be able to run the driver process from a normal user who can't reschedule things to that degree.

This is needed as a workaround for some USB dodginess, which I'm trying to alleviate by other means as well but this seems to be a quick and admittedly 'dirty' fix.

Thanks,

Dirk
5 years 8 months ago #26969

Please Log in or Create an account to join the conversation.

Time to create page: 0.403 seconds