Enlightenment CVS committal
Author : codewarrior
Project : e17
Module : proto
Dir : e17/proto/etk_server/src/bin
Modified Files:
etk_server.c
Log Message:
quickly add -d, we need it, also add etk.php
===================================================================
RCS file: /cvsroot/enlightenment/e17/proto/etk_server/src/bin/etk_server.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- etk_server.c 19 Mar 2006 23:19:15 -0000 1.3
+++ etk_server.c 20 Mar 2006 02:45:44 -0000 1.4
@@ -13,16 +13,35 @@
int main(int argc, char **argv)
{
- char *fifo_path;
-
+ char *fifo_path = NULL;
+ int i, pid = 0;
+
if(argc <= 1)
{
printf(_("etk_server error: no fifo file provided\n"));
return -1;
- }
+ }
- fifo_path = argv[1];
+ for(i = 1; i < argc; i++)
+ {
+ if(!strcmp(argv[i], "-d"))
+ pid = 1;
+ else fifo_path = argv[i];
+ }
+ if(pid == 1)
+ {
+ pid = fork();
+ if(pid)
+ exit(EXIT_SUCCESS);
+ }
+
+ if(fifo_path == NULL)
+ {
+ printf(_("etk_server error: no fifo file provided\n"));
+ return -1;
+ }
+
if(ecore_file_exists(fifo_path))
if(!ecore_file_unlink(fifo_path))
{
@@ -52,7 +71,6 @@
if((len = fread(&input, sizeof(char), 255, fifo)) > 0)
{
- int i;
int cur;
int spaces = 0;
int laststate;
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs