Skip to content

Commit 75d04a4

Browse files
committed
exec foreman to replace current process (#131)
* exec foreman to replace current process Use `exec` to invoke `foreman` to make sure `bin/dev` is replaced by the `foreman` process. This ensures that `foreman` gets `bin/dev`'s pid (so it's cleaned up properly) and that interrupts and signals (like `ctrl+c`) are handled correctly by `foreman` (to shut down child processes). * Use sh as least common denominator shell Some distros don't ship with bash, but will have sh. see also: rails/cssbundling-rails#98
1 parent a92e492 commit 75d04a4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/install/dev

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
#!/usr/bin/env bash
1+
#!/usr/bin/env sh
22

33
if ! gem list foreman -i --silent; then
44
echo "Installing foreman..."
55
gem install foreman
66
fi
77

8-
foreman start -f Procfile.dev "$@"
8+
exec foreman start -f Procfile.dev "$@"

0 commit comments

Comments
 (0)