Enlightenment CVS committal

Author  : codewarrior
Project : e17
Module  : proto

Dir     : e17/proto/enterminus/src/bin


Modified Files:
        main.c pty.c term.h 


Log Message:
restored old pid hanlders for now

===================================================================
RCS file: /cvsroot/enlightenment/e17/proto/enterminus/src/bin/main.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- main.c      11 Feb 2005 13:07:55 -0000      1.5
+++ main.c      19 Feb 2005 12:18:37 -0000      1.6
@@ -5,15 +5,14 @@
    Ecore_Evas  *ee;     /* ecore_evas */
    Evas        *evas;   /* evas       */
    Evas_Object *term;   /* terminal   */
-      
+   
    ee = ecore_evas_software_x11_new(0, 0, 0, 0, 0, 0);
    ecore_evas_show(ee);   
    evas = ecore_evas_get(ee);
-      
+            
    term = term_new(evas);
-   evas_object_show(term);   
-   
-   enterm_init(ee, term);   
+   evas_object_show(term);         
+   enterm_init(ee, term);
    
    ecore_main_loop_begin();
    ecore_evas_shutdown();
===================================================================
RCS file: /cvsroot/enlightenment/e17/proto/enterminus/src/bin/pty.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- pty.c       19 Feb 2005 10:15:37 -0000      1.5
+++ pty.c       19 Feb 2005 12:18:37 -0000      1.6
@@ -60,15 +60,11 @@
    return 0;
 }
 
-void sigchld_handler(void *data, int type, void *ev){//int a) {
+void sigchld_handler(int a) {
    int status = 0;
-   Term *term;
-   term = data;
-
-   printf("Exec singchld_handler %d\n",term->pid);
-   
-   if(waitpid(term->pid, &status, 0) < 0) {
-      fprintf(stderr, "Waiting for pid %hd failed: %m\n", term->pid);
+      
+   if(waitpid(pid, &status, 0) < 0) {
+      fprintf(stderr, "Waiting for pid %hd failed: %m\n", pid);
       exit(1);
    }
 
@@ -114,11 +110,11 @@
    if((term->cmd_fd.sys = get_pty(term)) < 0)
      return -1;
 
-   if((term->pid = fork()) < 0) {
+   if((pid = fork()) < 0) {
       fprintf(stderr, "Couldn't fork: %m\n");
       return -1;
    }
-   if(!term->pid) {
+   if(!pid) {
       /* child */
       get_tty(term);
 
@@ -140,9 +136,7 @@
 
    /* parent */
    close(term->slave.sys);
-   //signal(SIGCHLD, sigchld_handler);
-
-   ecore_event_handler_add(SIGCHLD, sigchld_handler, term);
+   signal(SIGCHLD, sigchld_handler);
    
    return 0;
 }
===================================================================
RCS file: /cvsroot/enlightenment/e17/proto/enterminus/src/bin/term.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -3 -r1.7 -r1.8
--- term.h      19 Feb 2005 10:15:37 -0000      1.7
+++ term.h      19 Feb 2005 12:18:37 -0000      1.8
@@ -48,7 +48,7 @@
 
 /* are those still global vars? if so, remove them */
 //char *ptydev, *ttydev;
-//pid_t pid;
+pid_t pid;
 
 struct _Term_Fd {
    int               sys;
@@ -148,8 +148,7 @@
 struct winsize *get_font_dim(Term *term);
 int             get_pty(Term *term);
 int             get_tty(Term *term);
-//void            sigchld_handler(int a);
-void sigchld_handler(void *data, int type, void *ev);
+void            sigchld_handler(int a);
 struct passwd  *find_user(void);
 int             execute_command(Term *term);//, int argc, const char **argv);
 




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to