process_starter 1.0.4 → 1.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/process_starter.rb +4 -3
- metadata +3 -3
data/lib/process_starter.rb
CHANGED
@@ -21,10 +21,11 @@ module ProcessStarter
|
|
21
21
|
# not waiting for it's finish, so child process run in parralel
|
22
22
|
# not inheritting file descriptors, so it finds and closes all opened handels
|
23
23
|
# works in windows and linux
|
24
|
-
def self.start(s, allowed_methods=
|
25
|
-
|
24
|
+
def self.start(s, allowed_methods = nil )
|
25
|
+
allowed_methods ||= [:psexec,:start,:posix_spawn,:spawn,:fork]
|
26
|
+
log "********* ProcessStarter.start INVOKING EXTERNAL COMMAND #{s}, WINRUN IS #{WINRUN}, HAVE_POSIX_SPAWN IS #{HAVE_POSIX_SPAWN}, HAVE_SPAWN is #{HAVE_SPAWN}, allowed_methods are #{allowed_methods.inspect}"
|
26
27
|
if WINRUN
|
27
|
-
@@have_psexec ||= ((`psexec /?` rescue "") =~ /computer/ ? 2 : 1)
|
28
|
+
@@have_psexec ||= allowed_methods.include?(:psexec) ? ((`psexec /?` rescue "") =~ /computer/ ? 2 : 1) : -1
|
28
29
|
if @@have_psexec == 2 and allowed_methods.include?(:psexec)
|
29
30
|
log "starting using psexec"
|
30
31
|
r = system("psexec -d #{s}")
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: process_starter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 29
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 1.0.
|
9
|
+
- 5
|
10
|
+
version: 1.0.5
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Pavel Vasev
|