libusb-1.0 hotplug events stop working in parent after fork(), when child calls libusb_exit()
问题 I've been developing an application that monitors the USB device tree using libusb_hotplug_register_callback() . When a device that matches some criteria is attached, it will fork() and exec() an application to handle this device. The application has been working fine for some time now, but I've come back to try and 'tidy it up'... libusb will open a number of file descriptors (see below) which it monitors for events, etc... The problem is that after I call fork() and before I call exec() , I