File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change 33* Fix binstubs not being replaced when their quoting style was changed (#534 )
44* Preserve comments right after the shebang line which might include magic comments such as `frozen_string_literal: true'
55* Fix binstub failures when Bundler's ` BUNDLE_APP_CONFIG ` environment variable is present (#545 )
6+ * Properly suspend and resume on ctrl-z TSTP and CONT (#361 )
67
78## 2.0.2
89
Original file line number Diff line number Diff line change @@ -161,6 +161,8 @@ def run_command(client, application)
161161 if pid && !pid . empty?
162162 log "got pid: #{ pid } "
163163
164+ suspend_resume_on_tstp_cont ( pid )
165+
164166 forward_signals ( application )
165167 status = application . read . to_i
166168
@@ -181,6 +183,18 @@ def queue_signals
181183 end
182184 end
183185
186+ def suspend_resume_on_tstp_cont ( pid )
187+ trap ( "TSTP" ) {
188+ log "suspended"
189+ Process . kill ( "STOP" , pid . to_i )
190+ Process . kill ( "STOP" , Process . pid )
191+ }
192+ trap ( "CONT" ) {
193+ log "resumed"
194+ Process . kill ( "CONT" , pid . to_i )
195+ }
196+ end
197+
184198 def forward_signals ( application )
185199 @signal_queue . each { |sig | kill sig , application }
186200
You can’t perform that action at this time.
0 commit comments