nusb/usbd: cleanup processes on unmount

this makes sure that when postsharesrv() fails (for
example because the shr file already exists), the
worker process gets killed and all file descriptors
to devusb get closed.
This commit is contained in:
cinap_lenrek 2020-03-08 16:06:37 +01:00
parent 06b9aa5039
commit fe39388250

View file

@ -338,8 +338,15 @@ usbdstart(Srv*)
}
}
static void
usbdend(Srv*)
{
postnote(PNGROUP, getpid(), "shutdown");
}
Srv usbdsrv = {
.start = usbdstart,
.end = usbdend,
.attach = usbdattach,
.walk1 = usbdwalk,
.read = usbdread,