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:
parent
06b9aa5039
commit
fe39388250
1 changed files with 7 additions and 0 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue