aboutsummaryrefslogtreecommitdiffstats
path: root/src/mkchild.c
diff options
context:
space:
mode:
authorLAN-TW <lantw44@gmail.com>2012-09-14 21:54:40 +0800
committerLAN-TW <lantw44@gmail.com>2012-09-14 21:54:40 +0800
commit8810a2c8b18ea7eb472d4e07db6a3f92c1ee8bb9 (patch)
treedd4804e7a0b16175ab96282862139c441bd5ef75 /src/mkchild.c
parentae5a715f94c4bb2400b466fb1516c1eb3b5a3682 (diff)
downloadsctjudge-8810a2c8b18ea7eb472d4e07db6a3f92c1ee8bb9.tar.gz
sctjudge-8810a2c8b18ea7eb472d4e07db6a3f92c1ee8bb9.tar.zst
sctjudge-8810a2c8b18ea7eb472d4e07db6a3f92c1ee8bb9.zip
Second commit - copy files from working tree
(1) Modify configure.ac to handle more situations. (2) ChangeLog is temporarily deleted. (3) An RPM spec file is added.
Diffstat (limited to 'src/mkchild.c')
-rw-r--r--src/mkchild.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mkchild.c b/src/mkchild.c
index 1f7f51d..772dbbe 100644
--- a/src/mkchild.c
+++ b/src/mkchild.c
@@ -377,7 +377,11 @@ void* sctjudge_makechild(void* arg){
/* 建立用來和 chlid process 溝通的 pipe */
pipe(childpipe);
pthread_mutex_lock(&pidmutex);
+#ifdef HAVE_WORKING_FORK
pidchild = fork();
+#else
+#error "This program requires a working fork function."
+#endif
if(pidchild < 0){
#ifndef HAVE_CONF_CAP
disable_setuid();