ÇöÀç Á¦°¡ ÀÓº£µðµå º¸µå pxa255_star¸¦ ¾²°í ÀÖ½À´Ï´Ù.
Ä«¸Þ¶ó µå¶óÀ̹ö¸¦ ¿Ã¸®°í
shell¿¡¼ '»çÁøÀ» Âï¾î¼ ƯÁ¤ µð·ºÅ丮¿¡ ÀúÀåÇÏ´Â ¸í·É¾î'¸¦ ³»¸®¸é
Àß µÇ´Âµ¥ cgi»ó¿¡¼ systemÇÔ¼ö¸¦ ÀÌ¿ëÇؼ ½ÇÇà½ÃÅ°¸é ±×³É Áö³ªÃÄ
°¡´Â±º¿ä system ÇÔ¼öÀÇ ½ÇÇà ÀÚü°¡ ¾ÊµÇ´Â°Å °°¾Æ¿ä.¹°·Ð test_camera´Â cgi-bin¿¡ Á¸ÀçÇÏ°í¿ä
printf("go")´Â ½ÇÇàÀÌ µÇ¼ go¶ó´Â ¹®ÀÚ°¡ À¥»ó¿¡ ¶ßÁö¸¸ system ÇÔ¼ö°¡ ½ÇÇàÀÌ ¾ÈµÇ¿ä Á¶¾ð ºÎŹµå¸³´Ï´Ù.
html ¹®¼´Â
<html>
<head>
<title> go </title>
</head>
<body>
<form method = get action = "cgi-bin/go.cgi">
<input type = "hidden" name = "direction" value = "go">
<input type = "submit" value = " go ">
</form>
</body>
</html>
go.cgi´Â ÀÌ·¸½À´Ï´Ù.
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/mman.h>
#include <asm/fcntl.h>
int main(void)
{
char *value;
printf("Content-type :text/html\n\n");
value = (char *)getenv("QUERY_STRING");
if(strcmp(value,"go")){
system("./test_camera");
printf("go\n");
}
printf("<html><head><title> go </title></head>\n");
printf("<body>\n");
printf("<form method = get action = go.cgi>");
printf("<input type = hidden name = direction value =go>");
printf("<input type = submit value = Go >");
printf("</form>\n");
printf("</body></html>\n");
return 0;
}