Skip to content

Commit

Permalink
Make pm dev-start a little less susceptible to stray pid files
Browse files Browse the repository at this point in the history
  • Loading branch information
marijnh committed Sep 26, 2018
1 parent fd19fe0 commit fbdf3b0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions bin/pm.js
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,10 @@ function devPID() {

function devStart() {
let pid = devPID()
if (pid != null) {
try { run("ps", ["-p", String(pid)]) }
catch (_) { pid = null }
}
if (pid != null) {
console.log("Dev server already running at pid " + pid)
return
Expand Down

0 comments on commit fbdf3b0

Please sign in to comment.