質問編集履歴
5
タイトル
title
CHANGED
@@ -1,1 +1,1 @@
|
|
1
|
-
RedirectStandardErrorを使用とすると固まる、ハングする。
|
1
|
+
RedirectStandardErrorを使用とすると固まる、ハングする。マルチスレッド問題?
|
body
CHANGED
File without changes
|
4
レイアウト
title
CHANGED
File without changes
|
body
CHANGED
@@ -4,26 +4,27 @@
|
|
4
4
|
二日かけて問題の特定すら(問題と思っていた部分がことごとく違った)できていません。
|
5
5
|
改善方法があればよろしくお願いします。
|
6
6
|
|
7
|
-
|
7
|
+
ProcessStartInfo process = new ProcessStartInfo();
|
8
|
-
|
8
|
+
process.FileName = CONPAIL_BAT_PATH;
|
9
|
-
|
9
|
+
process.Arguments = filePath;
|
10
10
|
|
11
|
-
|
11
|
+
process.CreateNoWindow = true; // コンソール・ウィンドウを開かない
|
12
|
-
|
12
|
+
process.UseShellExecute = false;// シェル機能を使用しない
|
13
|
-
``` textBox2.Text += string.Format("{0} をコンバートしました。" + ```Environment.NewLine, fileName);```
|
14
|
-
``` process.RedirectStandardOutput = false;```
|
15
|
-
``` process.RedirectStandardError = true;// エラー出力をリダイレクト```
|
16
|
-
``` process.RedirectStandardInput = false;```
|
17
13
|
|
14
|
+
textBox2.Text += string.Format("{0} をコンバートしました。" + Environment.NewLine, fileName);
|
15
|
+
process.RedirectStandardOutput = false;
|
16
|
+
process.RedirectStandardError = true;// エラー出力をリダイレクト
|
18
|
-
|
17
|
+
process.RedirectStandardInput = false;
|
19
18
|
|
20
|
-
|
19
|
+
Process st = Process.Start(process);
|
21
20
|
|
22
|
-
|
21
|
+
st.ErrorDataReceived += st_ErrorDataReceived;
|
23
22
|
|
24
|
-
``` st.WaitForExit();```
|
25
|
-
``` st.Dispose(); // 子プロセスの破棄```
|
26
|
-
|
23
|
+
st.BeginErrorReadLine();
|
27
24
|
|
25
|
+
st.WaitForExit();
|
26
|
+
st.Dispose(); // 子プロセスの破棄
|
27
|
+
st.Close();
|
28
|
+
|
28
|
-
|
29
|
+
textBox2.Text += textInput;
|
29
|
-
|
30
|
+
textBox2.Text += "" + Environment.NewLine;
|
3
レイアウト
title
CHANGED
File without changes
|
body
CHANGED
@@ -4,26 +4,26 @@
|
|
4
4
|
二日かけて問題の特定すら(問題と思っていた部分がことごとく違った)できていません。
|
5
5
|
改善方法があればよろしくお願いします。
|
6
6
|
|
7
|
-
```ProcessStartInfo process = new ProcessStartInfo();
|
7
|
+
```ProcessStartInfo process = new ProcessStartInfo();```
|
8
|
-
``` process.FileName = CONPAIL_BAT_PATH;
|
8
|
+
``` process.FileName = CONPAIL_BAT_PATH;```
|
9
|
-
``` process.Arguments = filePath;
|
9
|
+
``` process.Arguments = filePath;```
|
10
|
-
|
10
|
+
|
11
|
-
``` process.CreateNoWindow = true; // コンソール・ウィンドウを開かない
|
11
|
+
``` process.CreateNoWindow = true; // コンソール・ウィンドウを開かない```
|
12
|
-
``` process.UseShellExecute = false;// シェル機能を使用しない
|
12
|
+
``` process.UseShellExecute = false;// シェル機能を使用しない```
|
13
|
-
``` textBox2.Text += string.Format("{0} をコンバートしました。" + ```Environment.NewLine, fileName);
|
13
|
+
``` textBox2.Text += string.Format("{0} をコンバートしました。" + ```Environment.NewLine, fileName);```
|
14
|
-
``` process.RedirectStandardOutput = false;
|
14
|
+
``` process.RedirectStandardOutput = false;```
|
15
|
-
``` process.RedirectStandardError = true;// エラー出力をリダイレクト
|
15
|
+
``` process.RedirectStandardError = true;// エラー出力をリダイレクト```
|
16
|
-
``` process.RedirectStandardInput = false;
|
16
|
+
``` process.RedirectStandardInput = false;```
|
17
|
-
|
17
|
+
|
18
|
-
``` Process st = Process.Start(process);
|
18
|
+
``` Process st = Process.Start(process);```
|
19
|
-
|
19
|
+
|
20
|
-
``` st.ErrorDataReceived += st_ErrorDataReceived;
|
20
|
+
``` st.ErrorDataReceived += st_ErrorDataReceived;```
|
21
|
-
|
21
|
+
|
22
|
-
``` st.BeginErrorReadLine();
|
22
|
+
``` st.BeginErrorReadLine();```
|
23
|
-
|
23
|
+
|
24
|
-
``` st.WaitForExit();
|
24
|
+
``` st.WaitForExit();```
|
25
|
-
``` st.Dispose(); // 子プロセスの破棄
|
25
|
+
``` st.Dispose(); // 子プロセスの破棄```
|
26
|
-
``` st.Close();
|
26
|
+
``` st.Close();```
|
27
|
-
|
27
|
+
|
28
|
-
``` textBox2.Text += textInput;
|
28
|
+
``` textBox2.Text += textInput;```
|
29
29
|
``` textBox2.Text += "" + Environment.NewLine;```
|
2
レイアウト
title
CHANGED
File without changes
|
body
CHANGED
@@ -5,25 +5,25 @@
|
|
5
5
|
改善方法があればよろしくお願いします。
|
6
6
|
|
7
7
|
```ProcessStartInfo process = new ProcessStartInfo();
|
8
|
-
process.FileName = CONPAIL_BAT_PATH;
|
8
|
+
``` process.FileName = CONPAIL_BAT_PATH;
|
9
|
-
process.Arguments = filePath;
|
9
|
+
``` process.Arguments = filePath;
|
10
|
-
|
10
|
+
```
|
11
|
-
process.CreateNoWindow = true; // コンソール・ウィンドウを開かない
|
11
|
+
``` process.CreateNoWindow = true; // コンソール・ウィンドウを開かない
|
12
|
-
process.UseShellExecute = false;// シェル機能を使用しない
|
12
|
+
``` process.UseShellExecute = false;// シェル機能を使用しない
|
13
|
-
textBox2.Text += string.Format("{0} をコンバートしました。" + Environment.NewLine, fileName);
|
13
|
+
``` textBox2.Text += string.Format("{0} をコンバートしました。" + ```Environment.NewLine, fileName);
|
14
|
-
process.RedirectStandardOutput = false;
|
14
|
+
``` process.RedirectStandardOutput = false;
|
15
|
-
process.RedirectStandardError = true;// エラー出力をリダイレクト
|
15
|
+
``` process.RedirectStandardError = true;// エラー出力をリダイレクト
|
16
|
-
process.RedirectStandardInput = false;
|
16
|
+
``` process.RedirectStandardInput = false;
|
17
|
-
|
17
|
+
```
|
18
|
-
Process st = Process.Start(process);
|
18
|
+
``` Process st = Process.Start(process);
|
19
|
-
|
19
|
+
```
|
20
|
-
st.ErrorDataReceived += st_ErrorDataReceived;
|
20
|
+
``` st.ErrorDataReceived += st_ErrorDataReceived;
|
21
|
-
|
21
|
+
```
|
22
|
-
st.BeginErrorReadLine();
|
22
|
+
``` st.BeginErrorReadLine();
|
23
|
-
|
23
|
+
```
|
24
|
-
st.WaitForExit();
|
24
|
+
``` st.WaitForExit();
|
25
|
-
st.Dispose(); // 子プロセスの破棄
|
25
|
+
``` st.Dispose(); // 子プロセスの破棄
|
26
|
-
st.Close();
|
26
|
+
``` st.Close();
|
27
|
-
|
27
|
+
```
|
28
|
-
textBox2.Text += textInput;
|
28
|
+
``` textBox2.Text += textInput;
|
29
|
-
textBox2.Text += "" + Environment.NewLine;```
|
29
|
+
``` textBox2.Text += "" + Environment.NewLine;```
|
1
レイアウト
title
CHANGED
File without changes
|
body
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
二日かけて問題の特定すら(問題と思っていた部分がことごとく違った)できていません。
|
5
5
|
改善方法があればよろしくお願いします。
|
6
6
|
|
7
|
-
|
7
|
+
```ProcessStartInfo process = new ProcessStartInfo();
|
8
8
|
process.FileName = CONPAIL_BAT_PATH;
|
9
9
|
process.Arguments = filePath;
|
10
10
|
|
@@ -26,4 +26,4 @@
|
|
26
26
|
st.Close();
|
27
27
|
|
28
28
|
textBox2.Text += textInput;
|
29
|
-
textBox2.Text += "" + Environment.NewLine;
|
29
|
+
textBox2.Text += "" + Environment.NewLine;```
|