Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Record and check process start time #6

Merged
merged 4 commits into from
Sep 4, 2020
Merged

Conversation

Hopding
Copy link
Collaborator

@Hopding Hopding commented Sep 3, 2020

This PR causes the start time of each spawned process to be recorded in the processes.json file. This allows chip to detect when a new process is using the same PID as a process it had formerly spawned.

One scenario that can cause this to happen is rebooting your machine while chip processes are running. When your machine reboots, those chip processes are all gone. But your machine might use some PIDs that chip has stored in processes.json for system startup processes. Chip will then see these processes (e.g. with chip list) and think it created them because they have the same PID.

Recording and comparing the start time of processes in addition to their PID resolves this. In the example above, the start time of the new system processes would differ because they would have started after the reboot, but the chip.yml would have recorded start times from before the reboot.

@Hopding Hopding mentioned this pull request Sep 4, 2020
@Hopding Hopding merged commit 37095ad into master Sep 4, 2020
@Hopding Hopding deleted the RecordProcessStartTime branch September 4, 2020 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant