質問編集履歴

5

タイトル

2018/12/13 10:54

投稿

tomoyo1010
tomoyo1010

スコア24

test CHANGED
@@ -1 +1 @@
1
- RedirectStandardErrorを使用とすると固まる、ハングする。
1
+ RedirectStandardErrorを使用とすると固まる、ハングする。マルチスレッド問題?
test CHANGED
File without changes

4

レイアウト

2018/12/13 10:54

投稿

tomoyo1010
tomoyo1010

スコア24

test CHANGED
File without changes
test CHANGED
@@ -10,48 +10,50 @@
10
10
 
11
11
 
12
12
 
13
- ```ProcessStartInfo process = new ProcessStartInfo();```
13
+ ProcessStartInfo process = new ProcessStartInfo();
14
14
 
15
- ``` process.FileName = CONPAIL_BAT_PATH;```
15
+ process.FileName = CONPAIL_BAT_PATH;
16
16
 
17
- ``` process.Arguments = filePath;```
17
+ process.Arguments = filePath;
18
18
 
19
19
 
20
20
 
21
- ``` process.CreateNoWindow = true; // コンソール・ウィンドウを開かない```
21
+ process.CreateNoWindow = true; // コンソール・ウィンドウを開かない
22
22
 
23
- ``` process.UseShellExecute = false;// シェル機能を使用しない```
23
+ process.UseShellExecute = false;// シェル機能を使用しない
24
-
25
- ``` textBox2.Text += string.Format("{0} をコンバートしました。" + ```Environment.NewLine, fileName);```
26
-
27
- ``` process.RedirectStandardOutput = false;```
28
-
29
- ``` process.RedirectStandardError = true;// エラー出力をリダイレクト```
30
-
31
- ``` process.RedirectStandardInput = false;```
32
24
 
33
25
 
34
26
 
27
+ textBox2.Text += string.Format("{0} をコンバートしました。" + Environment.NewLine, fileName);
28
+
29
+ process.RedirectStandardOutput = false;
30
+
31
+ process.RedirectStandardError = true;// エラー出力をリダイレクト
32
+
35
- ``` Process st = Process.Start(process);```
33
+ process.RedirectStandardInput = false;
36
34
 
37
35
 
38
36
 
39
- ``` st.ErrorDataReceived += st_ErrorDataReceived;```
37
+ Process st = Process.Start(process);
40
38
 
41
39
 
42
40
 
43
- ``` st.BeginErrorReadLine();```
41
+ st.ErrorDataReceived += st_ErrorDataReceived;
44
42
 
45
43
 
46
44
 
47
- ``` st.WaitForExit();```
48
-
49
- ``` st.Dispose(); // 子プロセスの破棄```
50
-
51
- ``` st.Close();```
45
+ st.BeginErrorReadLine();
52
46
 
53
47
 
54
48
 
55
- ``` textBox2.Text += textInput;```
49
+ st.WaitForExit();
56
50
 
51
+ st.Dispose(); // 子プロセスの破棄
52
+
53
+ st.Close();
54
+
55
+
56
+
57
+ textBox2.Text += textInput;
58
+
57
- ``` textBox2.Text += "" + Environment.NewLine;```
59
+ textBox2.Text += "" + Environment.NewLine;

3

レイアウト

2018/12/13 09:47

投稿

tomoyo1010
tomoyo1010

スコア24

test CHANGED
File without changes
test CHANGED
@@ -10,48 +10,48 @@
10
10
 
11
11
 
12
12
 
13
- ```ProcessStartInfo process = new ProcessStartInfo();
13
+ ```ProcessStartInfo process = new ProcessStartInfo();```
14
14
 
15
- ``` process.FileName = CONPAIL_BAT_PATH;
15
+ ``` process.FileName = CONPAIL_BAT_PATH;```
16
16
 
17
- ``` process.Arguments = filePath;
17
+ ``` process.Arguments = filePath;```
18
18
 
19
- ```
20
19
 
21
- ``` process.CreateNoWindow = true; // コンソール・ウィンドウを開かない
22
20
 
23
- ``` process.UseShellExecute = false;// シェ機能使用しない
21
+ ``` process.CreateNoWindow = true; // コンソー・ウィンドウ開かない```
24
22
 
25
- ``` textBox2.Text += string.Format("{0}コンバートました。" + ```Environment.NewLine, fileName);
23
+ ``` process.UseShellExecute = false;// シェル機能使用ない```
26
24
 
27
- ``` process.RedirectStandardOutput = false;
25
+ ``` textBox2.Text += string.Format("{0} をコンバートしました。" + ```Environment.NewLine, fileName);```
28
26
 
29
- ``` process.RedirectStandardError = true;// エラー出力をリダイレクト
27
+ ``` process.RedirectStandardOutput = false;```
30
28
 
31
- ``` process.RedirectStandardInput = false;
29
+ ``` process.RedirectStandardError = true;// エラー出力をリダイレクト```
32
30
 
33
- ```
31
+ ``` process.RedirectStandardInput = false;```
34
32
 
35
- ``` Process st = Process.Start(process);
36
33
 
37
- ```
38
34
 
39
- ``` st.ErrorDataReceived += st_ErrorDataReceived;
35
+ ``` Process st = Process.Start(process);```
40
36
 
41
- ```
42
37
 
43
- ``` st.BeginErrorReadLine();
44
38
 
45
- ```
39
+ ``` st.ErrorDataReceived += st_ErrorDataReceived;```
46
40
 
47
- ``` st.WaitForExit();
48
41
 
49
- ``` st.Dispose(); // 子プロセスの破棄
50
42
 
51
- ``` st.Close();
43
+ ``` st.BeginErrorReadLine();```
52
44
 
53
- ```
54
45
 
46
+
47
+ ``` st.WaitForExit();```
48
+
49
+ ``` st.Dispose(); // 子プロセスの破棄```
50
+
51
+ ``` st.Close();```
52
+
53
+
54
+
55
- ``` textBox2.Text += textInput;
55
+ ``` textBox2.Text += textInput;```
56
56
 
57
57
  ``` textBox2.Text += "" + Environment.NewLine;```

2

レイアウト

2018/12/13 09:46

投稿

tomoyo1010
tomoyo1010

スコア24

test CHANGED
File without changes
test CHANGED
@@ -12,46 +12,46 @@
12
12
 
13
13
  ```ProcessStartInfo process = new ProcessStartInfo();
14
14
 
15
- process.FileName = CONPAIL_BAT_PATH;
15
+ ``` process.FileName = CONPAIL_BAT_PATH;
16
16
 
17
- process.Arguments = filePath;
17
+ ``` process.Arguments = filePath;
18
18
 
19
+ ```
19
20
 
21
+ ``` process.CreateNoWindow = true; // コンソール・ウィンドウを開かない
20
22
 
21
- process.CreateNoWindow = true; // コンソー・ウィンドウ開かない
23
+ ``` process.UseShellExecute = false;// シェ機能使用しない
22
24
 
23
- process.UseShellExecute = false;// シェル機能を使用しない
25
+ ``` textBox2.Text += string.Format("{0} をコンバートしました。" + ```Environment.NewLine, fileName);
24
26
 
25
- textBox2.Text += string.Format("{0} をコンバートしました。" + Environment.NewLine, fileName);
27
+ ``` process.RedirectStandardOutput = false;
26
28
 
27
- process.RedirectStandardOutput = false;
29
+ ``` process.RedirectStandardError = true;// エラー出力をリダイレクト
28
30
 
29
- process.RedirectStandardError = true;// エラー出力をリダイレクト
31
+ ``` process.RedirectStandardInput = false;
30
32
 
31
- process.RedirectStandardInput = false;
33
+ ```
32
34
 
35
+ ``` Process st = Process.Start(process);
33
36
 
37
+ ```
34
38
 
35
- Process st = Process.Start(process);
39
+ ``` st.ErrorDataReceived += st_ErrorDataReceived;
36
40
 
41
+ ```
37
42
 
43
+ ``` st.BeginErrorReadLine();
38
44
 
39
- st.ErrorDataReceived += st_ErrorDataReceived;
45
+ ```
40
46
 
47
+ ``` st.WaitForExit();
41
48
 
49
+ ``` st.Dispose(); // 子プロセスの破棄
42
50
 
43
- st.BeginErrorReadLine();
51
+ ``` st.Close();
44
52
 
53
+ ```
45
54
 
55
+ ``` textBox2.Text += textInput;
46
56
 
47
- st.WaitForExit();
48
-
49
- st.Dispose(); // 子プロセスの破棄
50
-
51
- st.Close();
52
-
53
-
54
-
55
- textBox2.Text += textInput;
56
-
57
- textBox2.Text += "" + Environment.NewLine;```
57
+ ``` textBox2.Text += "" + Environment.NewLine;```

1

レイアウト

2018/12/13 09:46

投稿

tomoyo1010
tomoyo1010

スコア24

test CHANGED
File without changes
test CHANGED
@@ -10,7 +10,7 @@
10
10
 
11
11
 
12
12
 
13
- """ProcessStartInfo process = new ProcessStartInfo();
13
+ ```ProcessStartInfo process = new ProcessStartInfo();
14
14
 
15
15
  process.FileName = CONPAIL_BAT_PATH;
16
16
 
@@ -54,4 +54,4 @@
54
54
 
55
55
  textBox2.Text += textInput;
56
56
 
57
- textBox2.Text += "" + Environment.NewLine;"""
57
+ textBox2.Text += "" + Environment.NewLine;```