1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-26 00:55:14 +00:00
freebsd-ports/comms/usbmuxd
Jason E. Hale f4bd2eeb66 comms/usbmuxd: Workaround devd(8) race condition
When connecting an Apple device via USB, the device connects, usbmuxd is
started, then for reasons yet unknown, the device instantly disconnects,
and reconnects.

From dmesg when plugging in, for example:
ugen0.5: <Apple Inc. iPhone> at usbus0
<usbmuxd starts here>
ugen0.5: <Apple Inc. iPhone> at usbus0 (disconnected)
ugen0.5: <Apple Inc. iPhone> at usbus0

Due to the disconnect, the instance of usbmuxd that is spawned when the
device is first attached is subsequently killed by the unexplained
detach because the cdce(4) devices have not yet been created, but not
before the second instance of usbmuxd is started by the reattach. The
second instance automatically exits because two instances cannot run
simultaneously. The first instance then exits leaving no running
instances.

Adding a short sleep after the first instance is called to shutdown
gives it enough time to completely exit before the second instance is
spawned. Unfortunately, only one device is supported at a time until
I can figure out why the hotplugging isn't working.

While here, cleanup whitespace.

PR:		280014
Reported by:	<fabio.comolli@gmail.com>
2024-07-12 02:24:35 -04:00
..
files comms/usbmuxd: Workaround devd(8) race condition 2024-07-12 02:24:35 -04:00
distinfo
Makefile comms/usbmuxd: Workaround devd(8) race condition 2024-07-12 02:24:35 -04:00
pkg-descr