Commit 4d730de
committed
autograde_wrapper.py improvements
- spawn a thread that calls wait(). We are pid 1 in the container
and need to collect all zombies, otherwise autodriver might get
confused
- Don't double fork. it's not easy to pass the full exit status
of autodriver through a double fork, so use os.execvp instead
of subprocess.call. This means we have to do some of the file
descriptor munging directly.
- Don't bother creating a temporary output file. Directly pipe
autodriver's output to the real output file1 parent 53dfe2e commit 4d730de
1 file changed
+38
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
10 | 26 | | |
11 | 27 | | |
12 | 28 | | |
13 | 29 | | |
14 | 30 | | |
15 | 31 | | |
| 32 | + | |
16 | 33 | | |
17 | 34 | | |
| 35 | + | |
18 | 36 | | |
19 | 37 | | |
20 | 38 | | |
21 | | - | |
22 | 39 | | |
23 | 40 | | |
24 | 41 | | |
25 | | - | |
26 | | - | |
27 | | - | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
28 | 58 | | |
29 | | - | |
| 59 | + | |
30 | 60 | | |
31 | 61 | | |
32 | | - | |
33 | | - | |
| 62 | + | |
| 63 | + | |
34 | 64 | | |
0 commit comments