mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-23 18:02:05 -05:00
Kernel: Initialize ProcFS timestamps to process creation time
This commit is contained in:
parent
f25530a12d
commit
7f855ad6b3
1 changed files with 12 additions and 3 deletions
|
@ -394,7 +394,10 @@ InodeMetadata ProcFSInode::metadata() const
|
|||
metadata.uid = credentials->uid();
|
||||
metadata.gid = credentials->gid();
|
||||
metadata.size = 0;
|
||||
metadata.mtime = TimeManagement::now();
|
||||
auto creation_time = process->creation_time();
|
||||
metadata.atime = creation_time;
|
||||
metadata.ctime = creation_time;
|
||||
metadata.mtime = creation_time;
|
||||
break;
|
||||
}
|
||||
case Type::ProcessDirectory: {
|
||||
|
@ -408,7 +411,10 @@ InodeMetadata ProcFSInode::metadata() const
|
|||
metadata.uid = credentials->uid();
|
||||
metadata.gid = credentials->gid();
|
||||
metadata.size = 0;
|
||||
metadata.mtime = TimeManagement::now();
|
||||
auto creation_time = process->creation_time();
|
||||
metadata.atime = creation_time;
|
||||
metadata.ctime = creation_time;
|
||||
metadata.mtime = creation_time;
|
||||
break;
|
||||
}
|
||||
case Type::ProcessSubdirectory: {
|
||||
|
@ -422,7 +428,10 @@ InodeMetadata ProcFSInode::metadata() const
|
|||
metadata.uid = credentials->uid();
|
||||
metadata.gid = credentials->gid();
|
||||
metadata.size = 0;
|
||||
metadata.mtime = TimeManagement::now();
|
||||
auto creation_time = process->creation_time();
|
||||
metadata.atime = creation_time;
|
||||
metadata.ctime = creation_time;
|
||||
metadata.mtime = creation_time;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue