AristoChen / usb-proxy

A USB proxy based on raw-gadget and libusb

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

hotplug_callback bug

wzw88486969 opened this issue · comments

int hotplug_callback(struct libusb_context *ctx __attribute__((unused)),
			struct libusb_device *dev __attribute__((unused)),
			libusb_hotplug_event envet __attribute__((unused)),
			void *user_data __attribute__((unused))) {
	printf("Hotplug event\n");

	kill(0, SIGINT);
	return 0;
}

Suggest replacing the kill 0 line with another one. I have integrated it into the Android system. When plugging in or unplugging peripherals, it may send a SIGINT signal to the init 0 process, causing system issues.