File tree Expand file tree Collapse file tree 1 file changed +11
-12
lines changed
projects/client/Unit/src/unit Expand file tree Collapse file tree 1 file changed +11
-12
lines changed Original file line number Diff line number Diff line change @@ -101,32 +101,31 @@ protected void Unblock()
101
101
ExecRabbitMQCtl ( "set_vm_memory_high_watermark 0.4" ) ;
102
102
}
103
103
104
- protected void ExecRabbitMQCtl ( string command )
104
+ protected void ExecRabbitMQCtl ( string args )
105
105
{
106
106
if ( IsRunningOnMono ( ) ) {
107
- ExecCommand ( "../rabbitmq-server/scripts/rabbitmqctl " + command ) ;
107
+ ExecCommand ( "../../../../../../ rabbitmq-server/scripts/rabbitmqctl" , args ) ;
108
108
} else {
109
- ExecCommand ( "..\\ rabbitmq-server\\ scripts\\ rabbitmqctl.bat " + command ) ;
109
+ ExecCommand ( "..\\ .. \\ .. \\ .. \\ .. \\ .. \\ rabbitmq-server\\ scripts\\ rabbitmqctl.bat" , args ) ;
110
110
}
111
111
}
112
112
113
- protected void ExecCommand ( string command )
113
+ protected void ExecCommand ( string ctl , string args )
114
114
{
115
115
Process proc = new Process ( ) ;
116
- proc . StartInfo . CreateNoWindow = true ;
116
+ proc . StartInfo . CreateNoWindow = true ;
117
+ proc . StartInfo . UseShellExecute = false ;
117
118
118
- string sh ;
119
- string args ;
119
+ string cmd ;
120
120
if ( IsRunningOnMono ( ) ) {
121
- sh = "/bin/sh" ;
122
- args = "-c " + command ;
121
+ cmd = ctl ;
123
122
} else {
124
- sh = "C:\\ winnt\\ system32\\ cmd.exe" ;
125
- args = "/y /c " + command ;
123
+ cmd = "C:\\ winnt\\ system32\\ cmd.exe" ;
124
+ args = "/y /c " + ctl + " " + args ;
126
125
}
127
126
128
127
try {
129
- proc . StartInfo . FileName = sh ;
128
+ proc . StartInfo . FileName = cmd ;
130
129
proc . StartInfo . Arguments = args ;
131
130
132
131
proc . Start ( ) ;
You can’t perform that action at this time.
0 commit comments