Skip to content

Commit

Permalink
fix process forked not clear between cases
Browse files Browse the repository at this point in the history
  • Loading branch information
SunriseFox committed Mar 30, 2019
1 parent 40dc386 commit cf0c43c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions judgecore/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1128,6 +1128,8 @@ struct JUDGE_RESULT {
};

int load_seccomp_tracer(int pid, JUDGE_RESULT& result) {
process_forked = 0;

info = tail = new THREAD_INFO;
int status;

Expand Down
1 change: 1 addition & 0 deletions profile/test_output.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ int main() {
for (int i = 0; i < 100 * 10000; i++) {
cout << 1 << "";
}
cout << flush;
}
3 changes: 3 additions & 0 deletions profile/test_write.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// means no harm. just to test performance

#include <iostream>

using namespace std;
Expand All @@ -6,4 +8,5 @@ int main() {
for (int i = 0; i < 100 * 10000; i++) {
cout << 1 << flush;
}
cout << flush;
}

0 comments on commit cf0c43c

Please sign in to comment.