Skip to content

Commit af55ad6

Browse files
Matthias Geierjonleighton
authored andcommitted
Add OpenBSD compatibility for spring status
- ps -A is an alias for ps -ax, which works across linux and BSD platforms - ps -ax -o args= -- args is an alias for command which works across linux and BSD platforms
1 parent 8685b9f commit af55ad6

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## Next version
2+
3+
* Add OpenBSD compatibility for `spring status`. Issue #299.
4+
15
## 1.2.0
26

37
* Accept -e and --environment options for `rails console`.

lib/spring/client/status.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ def call
1717
end
1818

1919
def print_process(pid)
20-
puts `ps -p #{pid} -o pid= -o args=`
20+
puts `ps -p #{pid} -o pid= -o command=`
2121
end
2222

2323
def application_pids
24-
candidates = `ps -A -o ppid= -o pid=`.lines
24+
candidates = `ps -ax -o ppid= -o pid=`.lines
2525
candidates.select { |l| l =~ /^(\s+)?#{env.pid} / }
2626
.map { |l| l.split(" ").last }
2727
end

0 commit comments

Comments
 (0)