-
Notifications
You must be signed in to change notification settings - Fork 69
Closed
Description
Upon opening atomic-server, earlier running instances should be closed.
This would make a deploy script #165 far easier to realize, and it would be something that I'd personally want as a behavior.
I need to do two things:
- Detect if a process is running
- Kill the process
Detect process by using .pid file
I can create a text file file in ~/.config/atomic/pid that contains the pid of a running server, which removes the .pid when a server is running.
Detect process by checking if DB can be openend
The .init() function of DB errors if the DB file is locked. We can use this to check if the process is running. But we still cant kill it.. Probably need a pid!
Kill the process using a cross-platform library
Seems like the heim crate has what I need!I
Metadata
Metadata
Assignees
Labels
No labels