Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 187365 Details for
Bug 232875
System hangs at shutdown after message "Killing processes using ALSA"
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
rmmod snd* modules in topological order
alsa-rmmod-topsort.patch (text/plain), 1.49 KB, created by
Pavel Shved
on 2009-04-05 12:03:52 UTC
(
hide
)
Description:
rmmod snd* modules in topological order
Filename:
MIME Type:
Creator:
Pavel Shved
Created:
2009-04-05 12:03:52 UTC
Size:
1.49 KB
patch
obsolete
>--- a/alsasound 2009-04-05 15:31:43.000000000 +0400 >+++ b/alsasound 2009-04-05 15:52:29.000000000 +0400 >@@ -90,31 +90,30 @@ > rmmod gameport 2>/dev/null > > lsmod | grep -vq '^snd' > } > >-unload_modules_recursive() { >- local revdeps="$(lsmod | sed -n -e "s/,/ /g" -e "s/^$1 *[0-9]* *[0-9]* \(.*\)/\1/p")" >+unload_modules_topsort() { >+ #Load the module with the least reverse dependency number--that will be zero >+ local victim="" >+ while { victim="$(lsmod | sort --key=3 --numeric-sort | sed -n -e '/^snd/{s/^\(snd[^ ]*\) *[0-9]* *\([0-9]*\).*/\1 \2/p;q}')"; [[ -n "$victim" ]] ; } ; do >+ local modname=$(echo "$victim" | cut -d ' ' -f 1) >+ local rdepnum=$(echo "$victim" | cut -d ' ' -f 2) >+ if (( $rdepnum != 0 )) ; then >+ ewarn "WARNING: can't rmmod $modname. Some modules are not unloaded!" >+ return >+ fi > >- for module in ${revdeps} ; do >- unload_modules_recursive "${module}" >+ vebegin "Unloading: $modname" >+ rmmod --wait "$modname" >+ veend $? > done >- >- vebegin "Unloading: $1" >- rmmod --wait "$1" >- veend $? > } > > unload_modules_26() { >- # First of all, remove the snd module and all the modules depending >- # on it, this should remove already most of ALSA modules. >- lsmod | grep -q "^snd[[:space:]]" && unload_modules_recursive snd >- >- # Then find the remaining ones, and handle them too. >- for module in $(lsmod | sed -n -e 's/^\(snd[^ ]*\) .*/\1/p'); do >- unload_modules_recursive "${module}" >- done >+ # Remove all snd* modules >+ unload_modules_topsort > > lsmod | grep -vq "^snd" > } > > terminate() {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 232875
:
162692
|
186372
| 187365