Disable graphical debug only once writing to the fd
This allows obtaining an fd for this before calling setrens while doing the actual disabling after calling it.
This commit is contained in:
+8
-6
@@ -61,12 +61,7 @@ impl KernelScheme for DebugScheme {
|
||||
|
||||
"no-preserve" => SpecialFds::NoPreserve as usize,
|
||||
|
||||
"disable-graphical-debug" => {
|
||||
#[cfg(feature = "graphical_debug")]
|
||||
graphical_debug::fini();
|
||||
|
||||
SpecialFds::DisableGraphicalDebug as usize
|
||||
}
|
||||
"disable-graphical-debug" => SpecialFds::DisableGraphicalDebug as usize,
|
||||
|
||||
#[cfg(feature = "profiling")]
|
||||
p if p.starts_with("profiling-") => {
|
||||
@@ -165,6 +160,13 @@ impl KernelScheme for DebugScheme {
|
||||
return Ok(1);
|
||||
}
|
||||
|
||||
if handle.num == SpecialFds::DisableGraphicalDebug as usize {
|
||||
#[cfg(feature = "graphical_debug")]
|
||||
graphical_debug::fini();
|
||||
|
||||
return Ok(0);
|
||||
}
|
||||
|
||||
if handle.num != SpecialFds::Default as usize
|
||||
&& handle.num != SpecialFds::NoPreserve as usize
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user