Ignore:
Timestamp:
08/27/08 23:19:02 (5 years ago)
Author:
pterjan
Message:
  • Fix grab to work again on systems using sysenter instead of int 80
File:
1 edited

Legend:

Unmodified
Added
Removed
  • neercs/trunk/src/grab.c

    r2516 r2785  
    5454 
    5555    child = mytrace_fork(parent); 
     56    mytrace_write(parent, 1, "\x1b]0;\x07", 5); 
     57    mytrace_write(parent, 1, "\x1b[1000l", 7); 
     58    mytrace_write(parent, 1, "\x1b[?12l\x1b[?25h", 12); 
     59    mytrace_write(parent, 1, "\n[Process stolen by neercs]\n", 28); 
     60    /* FIXME Reset the term */ 
     61    mytrace_close(parent, 1); 
     62 
     63    mytrace_exit(parent, 0); 
     64    mytrace_detach(parent); 
    5665    pid = mytrace_getpid(child); 
    5766 
     
    7685            continue; 
    7786 
    78         debug("found pty %d", i); 
    79  
    80         if(i == 2) 
    81         { 
    82             mytrace_write(parent, i, "\x1b]0;\x07", 5); 
    83             mytrace_write(parent, i, "\x1b[1000l", 7); 
    84             mytrace_write(parent, i, "\x1b[?12l\x1b[?25h", 12); 
    85             mytrace_write(parent, i, "\n[Process stolen by neercs]\n", 28); 
    86         } 
     87        debug("found pty %d for pid %d", i, pid); 
    8788 
    8889        ret = mytrace_close(child, i); 
     
    122123    debug("pid %ld has now sid %d", pid, getsid(pid)); 
    123124 
    124     mytrace_exit(parent, 0); 
    125     mytrace_detach(parent); 
    126  
    127125    /* Reopen PTY file descriptors */ 
    128126    for(i = 0; i <= 2; i++) 
Note: See TracChangeset for help on using the changeset viewer.