mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 19:12:43 +00:00 
			
		
		
		
	LibCore: Use new global variables at /sys/kernel/ directory
This commit is contained in:
		
							parent
							
								
									5dfb2b18f3
								
							
						
					
					
						commit
						c7dca00b65
					
				
					 2 changed files with 4 additions and 4 deletions
				
			
		|  | @ -20,13 +20,13 @@ Optional<AllProcessesStatistics> ProcessStatisticsReader::get_all(RefPtr<Core::F | |||
| { | ||||
|     if (proc_all_file) { | ||||
|         if (!proc_all_file->seek(0, Core::SeekMode::SetPosition)) { | ||||
|             warnln("ProcessStatisticsReader: Failed to refresh /proc/all: {}", proc_all_file->error_string()); | ||||
|             warnln("ProcessStatisticsReader: Failed to refresh /sys/kernel/processes: {}", proc_all_file->error_string()); | ||||
|             return {}; | ||||
|         } | ||||
|     } else { | ||||
|         proc_all_file = Core::File::construct("/proc/all"); | ||||
|         proc_all_file = Core::File::construct("/sys/kernel/processes"); | ||||
|         if (!proc_all_file->open(Core::OpenMode::ReadOnly)) { | ||||
|             warnln("ProcessStatisticsReader: Failed to open /proc/all: {}", proc_all_file->error_string()); | ||||
|             warnln("ProcessStatisticsReader: Failed to open /sys/kernel/processes: {}", proc_all_file->error_string()); | ||||
|             return {}; | ||||
|         } | ||||
|     } | ||||
|  |  | |||
|  | @ -34,7 +34,7 @@ struct ThreadStatistics { | |||
| }; | ||||
| 
 | ||||
| struct ProcessStatistics { | ||||
|     // Keep this in sync with /proc/all.
 | ||||
|     // Keep this in sync with /sys/kernel/processes.
 | ||||
|     // From the kernel side:
 | ||||
|     pid_t pid; | ||||
|     pid_t pgid; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Liav A
						Liav A