Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fix tcsetpgrp on OSX #83

Merged
merged 1 commit into from

2 participants

@dougm

Also reported in issue #64

@cdickmann cdickmann merged commit 2903329 into vmware:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Sep 28, 2013
  1. @dougm

    Fix tcsetpgrp on OSX

    dougm authored
This page is out of date. Refresh to see the latest.
Showing with 7 additions and 1 deletion.
  1. +7 −1 lib/rvc/util.rb
View
8 lib/rvc/util.rb
@@ -24,6 +24,12 @@ module RVC
module Util
extend self
+ if RbConfig::CONFIG['host_os'] =~ /^darwin/
+ TCSETPGRP = 0x80047476
+ else
+ TCSETPGRP = 0x5410
+ end
+
def menu items
items.each_with_index { |x, i| puts "#{i} #{x}" }
input = Readline.readline("? ", false)
@@ -132,7 +138,7 @@ def interactive?
def tcsetpgrp pgrp=Process.getpgrp
return unless $stdin.tty?
trap('TTOU', 'SIG_IGN')
- $stdin.ioctl 0x5410, [pgrp].pack('I')
+ $stdin.ioctl TCSETPGRP, [pgrp].pack('I')
trap('TTOU', 'SIG_DFL')
end
Something went wrong with that request. Please try again.