Driver process initialize function override (INDI::CCD) #26969
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.