| Summary: | Spurious "compilation failed" errors | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Tools] CDT | Reporter: | Samuel DEVULDER <samuel.devulder> | ||||
| Component: | cdt-core | Assignee: | Project Inbox <cdt-core-inbox> | ||||
| Status: | NEW --- | QA Contact: | Jonah Graham <jonah> | ||||
| Severity: | normal | ||||||
| Priority: | P3 | ||||||
| Version: | 8.0 | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | PC | ||||||
| OS: | Windows 7 | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Samuel DEVULDER
Created attachment 199882 [details]
A patch that adds a critical section and collects the exit status before clearing the pid.
Details:
This patch uses a critical section to get the pid and store it in local variable to prevent concurrent access from waitForTermination()'s thread.
If waitForTermination()'s thread gets executed before java calls spawner.waitFor(pid), the exit code is collected and stored in the pCurProcInfo structure and the PID is cleared. Therefore, when waitFor() is later called and pid is cleared, the exit_code isn't obtained from the OS (the process is terminated anyway), but directly from the pCurProcInfo structure.
Using this patch I didn't get any more spurious compilation problems after about 24hours of cumulative compilation time.
|