babblishu / hustoj

Automatically exported from code.google.com/p/hustoj
0 stars 0 forks source link

support mono c# #38

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
according to wiki i add perl and php language but when i wanted to add mono c# 
the runtime error occured.
i have attatched judged_client.cc , okcalls.h and the runtime error to this 
message.
please help me to solve the error.

Original issue reported on code.google.com by hamidrezaabdi on 5 Mar 2011 at 8:59

Attachments:

GoogleCodeExporter commented 9 years ago
i'm not familiar with c#, but as the error.out said:

(Main.exe:3425): GLib-WARNING **: getpwuid_r(): failed due to unknown user id 
(1536)

** (Main.exe:3425): CRITICAL **: _wapi_shm_file_open: shared file 
[/root/.wapi/shared_data-acm-945PL-S3-Linux-i686-312-12-0] open error: No such 
file or directory

** (Main.exe:3425): CRITICAL **: _wapi_shm_attach: shared file 
[/root/.wapi/shared_data-acm-945PL-S3-Linux-i686-312-12-0] open error

to get over these warning/error,i suggest that you try to add some code to:
void copy_mono_runtime(char * work_dir) {

like
        execute_cmd("echo 'judge:*:1536:1536:*:/:/bin/sh' > %d/etc/passwd", work_dir);

PS: 
   the langmask in database table of contest is a tiny-int which means it's 8bits top, to make it works for more languages, you might need to modify the table structure, and please add them to /admin/updatedb.php

BTW:
       your Edit_AREA is fantastic 

Original comment by newsc...@gmail.com on 5 Mar 2011 at 10:31

GoogleCodeExporter commented 9 years ago
mistake :
  execute_cmd("echo 'judge:*:1536:1536:*:/:/bin/sh' > %d/etc/passwd", work_dir);
should be
  execute_cmd("echo 'judge:x:1536:1536:judge:/:/bin/sh' > %d/etc/passwd", work_dir);

Original comment by newsc...@gmail.com on 11 Mar 2011 at 10:09

GoogleCodeExporter commented 9 years ago

Original comment by newsc...@gmail.com on 16 Jul 2011 at 3:06