You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Kevin Zhou (JIRA)" <ji...@apache.org> on 2008/10/30 04:23:44 UTC
[jira] Created: (HARMONY-6004) [classlib] [luni] System.exec() gets
interruption will cause InternalError
[classlib] [luni] System.exec() gets interruption will cause InternalError
--------------------------------------------------------------------------
Key: HARMONY-6004
URL: https://issues.apache.org/jira/browse/HARMONY-6004
Project: Harmony
Issue Type: Bug
Components: Classlib
Affects Versions: 5.0M7
Reporter: Kevin Zhou
Fix For: 5.0M8
Conduct a test case [1] on HY5 and RI.
Modify the final part of Support_Exec from [2] to [3].
RI works well while HY5 throws InternalError.
[1]. SystemProcessTest
public void test_interrupt() throws Exception {
Object[] execArgs = null;
Process process = null;
try {
Thread.currentThread().interrupt();
execArgs = Support_Exec.execJava2(
new String[] { "tests.support.Support_AvailTest" }, null,
true);
process = (Process) execArgs[0];
OutputStream os = process.getOutputStream();
os.write("10 5 abcde".getBytes());
os.close();
process.waitFor();
fail("Should throw InterruptedException");
} catch (InterruptedException e) {
// Expected
}
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
// Ignored
}
process.waitFor();
Support_Exec.checkStderr(execArgs);
process.destroy();
}
[2].
synchronized (proc) {
errThread.start();
// wait for errThread to start
proc.wait();
[3].
synchronized (proc) {
errThread.start();
// wait for errThread to start
int count = 0;
boolean isFinished = false;
while(!isFinished) {
try {
proc.wait();
isFinished = true;
} catch (InterruptedException e) {
if(++count == 2) {
throw e;
}
}
}
if(count > 0) {
Thread.currentThread().interrupt();
}
}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (HARMONY-6004) [classlib] [luni] System.exec() gets
interruption will cause InternalError
Posted by "Kevin Zhou (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6004?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kevin Zhou closed HARMONY-6004.
-------------------------------
> [classlib] [luni] System.exec() gets interruption will cause InternalError
> --------------------------------------------------------------------------
>
> Key: HARMONY-6004
> URL: https://issues.apache.org/jira/browse/HARMONY-6004
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Affects Versions: 5.0M7
> Reporter: Kevin Zhou
> Assignee: Sean Qiu
> Fix For: 5.0M8
>
> Attachments: HARMONY-6004.diff
>
> Original Estimate: 48h
> Remaining Estimate: 48h
>
> Conduct a test case [1] on HY5 and RI.
> Modify the final part of Support_Exec from [2] to [3].
> RI works well while HY5 throws InternalError.
> [1]. SystemProcessTest
> public void test_interrupt() throws Exception {
> Object[] execArgs = null;
> Process process = null;
> try {
> Thread.currentThread().interrupt();
> execArgs = Support_Exec.execJava2(
> new String[] { "tests.support.Support_AvailTest" }, null,
> true);
> process = (Process) execArgs[0];
> OutputStream os = process.getOutputStream();
> os.write("10 5 abcde".getBytes());
> os.close();
> process.waitFor();
> fail("Should throw InterruptedException");
> } catch (InterruptedException e) {
> // Expected
> }
> try {
> Thread.sleep(1000);
> } catch (InterruptedException e) {
> // Ignored
> }
> process.waitFor();
> Support_Exec.checkStderr(execArgs);
> process.destroy();
> }
> [2].
> synchronized (proc) {
> errThread.start();
> // wait for errThread to start
> proc.wait();
> [3].
> synchronized (proc) {
> errThread.start();
> // wait for errThread to start
> int count = 0;
> boolean isFinished = false;
> while(!isFinished) {
> try {
> proc.wait();
> isFinished = true;
> } catch (InterruptedException e) {
> if(++count == 2) {
> throw e;
> }
> }
> }
> if(count > 0) {
> Thread.currentThread().interrupt();
> }
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (HARMONY-6004) [classlib] [luni] System.exec()
gets interruption will cause InternalError
Posted by "Sean Qiu (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6004?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sean Qiu reassigned HARMONY-6004:
---------------------------------
Assignee: Sean Qiu
> [classlib] [luni] System.exec() gets interruption will cause InternalError
> --------------------------------------------------------------------------
>
> Key: HARMONY-6004
> URL: https://issues.apache.org/jira/browse/HARMONY-6004
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Affects Versions: 5.0M7
> Reporter: Kevin Zhou
> Assignee: Sean Qiu
> Fix For: 5.0M8
>
> Attachments: HARMONY-6004.diff
>
> Original Estimate: 48h
> Remaining Estimate: 48h
>
> Conduct a test case [1] on HY5 and RI.
> Modify the final part of Support_Exec from [2] to [3].
> RI works well while HY5 throws InternalError.
> [1]. SystemProcessTest
> public void test_interrupt() throws Exception {
> Object[] execArgs = null;
> Process process = null;
> try {
> Thread.currentThread().interrupt();
> execArgs = Support_Exec.execJava2(
> new String[] { "tests.support.Support_AvailTest" }, null,
> true);
> process = (Process) execArgs[0];
> OutputStream os = process.getOutputStream();
> os.write("10 5 abcde".getBytes());
> os.close();
> process.waitFor();
> fail("Should throw InterruptedException");
> } catch (InterruptedException e) {
> // Expected
> }
> try {
> Thread.sleep(1000);
> } catch (InterruptedException e) {
> // Ignored
> }
> process.waitFor();
> Support_Exec.checkStderr(execArgs);
> process.destroy();
> }
> [2].
> synchronized (proc) {
> errThread.start();
> // wait for errThread to start
> proc.wait();
> [3].
> synchronized (proc) {
> errThread.start();
> // wait for errThread to start
> int count = 0;
> boolean isFinished = false;
> while(!isFinished) {
> try {
> proc.wait();
> isFinished = true;
> } catch (InterruptedException e) {
> if(++count == 2) {
> throw e;
> }
> }
> }
> if(count > 0) {
> Thread.currentThread().interrupt();
> }
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (HARMONY-6004) [classlib] [luni] System.exec()
gets interruption will cause InternalError
Posted by "Sean Qiu (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6004?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sean Qiu resolved HARMONY-6004.
-------------------------------
Resolution: Fixed
Path applied at revision r709116.
Thank you very much for the patch.
Please verify if it works as you expected.
> [classlib] [luni] System.exec() gets interruption will cause InternalError
> --------------------------------------------------------------------------
>
> Key: HARMONY-6004
> URL: https://issues.apache.org/jira/browse/HARMONY-6004
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Affects Versions: 5.0M7
> Reporter: Kevin Zhou
> Assignee: Sean Qiu
> Fix For: 5.0M8
>
> Attachments: HARMONY-6004.diff
>
> Original Estimate: 48h
> Remaining Estimate: 48h
>
> Conduct a test case [1] on HY5 and RI.
> Modify the final part of Support_Exec from [2] to [3].
> RI works well while HY5 throws InternalError.
> [1]. SystemProcessTest
> public void test_interrupt() throws Exception {
> Object[] execArgs = null;
> Process process = null;
> try {
> Thread.currentThread().interrupt();
> execArgs = Support_Exec.execJava2(
> new String[] { "tests.support.Support_AvailTest" }, null,
> true);
> process = (Process) execArgs[0];
> OutputStream os = process.getOutputStream();
> os.write("10 5 abcde".getBytes());
> os.close();
> process.waitFor();
> fail("Should throw InterruptedException");
> } catch (InterruptedException e) {
> // Expected
> }
> try {
> Thread.sleep(1000);
> } catch (InterruptedException e) {
> // Ignored
> }
> process.waitFor();
> Support_Exec.checkStderr(execArgs);
> process.destroy();
> }
> [2].
> synchronized (proc) {
> errThread.start();
> // wait for errThread to start
> proc.wait();
> [3].
> synchronized (proc) {
> errThread.start();
> // wait for errThread to start
> int count = 0;
> boolean isFinished = false;
> while(!isFinished) {
> try {
> proc.wait();
> isFinished = true;
> } catch (InterruptedException e) {
> if(++count == 2) {
> throw e;
> }
> }
> }
> if(count > 0) {
> Thread.currentThread().interrupt();
> }
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HARMONY-6004) [classlib] [luni] System.exec() gets
interruption will cause InternalError
Posted by "Kevin Zhou (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6004?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kevin Zhou updated HARMONY-6004:
--------------------------------
Attachment: HARMONY-6004.diff
Would you please help to try this?
> [classlib] [luni] System.exec() gets interruption will cause InternalError
> --------------------------------------------------------------------------
>
> Key: HARMONY-6004
> URL: https://issues.apache.org/jira/browse/HARMONY-6004
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Affects Versions: 5.0M7
> Reporter: Kevin Zhou
> Fix For: 5.0M8
>
> Attachments: HARMONY-6004.diff
>
> Original Estimate: 48h
> Remaining Estimate: 48h
>
> Conduct a test case [1] on HY5 and RI.
> Modify the final part of Support_Exec from [2] to [3].
> RI works well while HY5 throws InternalError.
> [1]. SystemProcessTest
> public void test_interrupt() throws Exception {
> Object[] execArgs = null;
> Process process = null;
> try {
> Thread.currentThread().interrupt();
> execArgs = Support_Exec.execJava2(
> new String[] { "tests.support.Support_AvailTest" }, null,
> true);
> process = (Process) execArgs[0];
> OutputStream os = process.getOutputStream();
> os.write("10 5 abcde".getBytes());
> os.close();
> process.waitFor();
> fail("Should throw InterruptedException");
> } catch (InterruptedException e) {
> // Expected
> }
> try {
> Thread.sleep(1000);
> } catch (InterruptedException e) {
> // Ignored
> }
> process.waitFor();
> Support_Exec.checkStderr(execArgs);
> process.destroy();
> }
> [2].
> synchronized (proc) {
> errThread.start();
> // wait for errThread to start
> proc.wait();
> [3].
> synchronized (proc) {
> errThread.start();
> // wait for errThread to start
> int count = 0;
> boolean isFinished = false;
> while(!isFinished) {
> try {
> proc.wait();
> isFinished = true;
> } catch (InterruptedException e) {
> if(++count == 2) {
> throw e;
> }
> }
> }
> if(count > 0) {
> Thread.currentThread().interrupt();
> }
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.