Ignore:
Timestamp:
Oct 18, 2008, 11:54:52 PM (13 years ago)
Author:
Pascal Terjan
Message:
  • Run /usr/bin/reset in target process after a grab
File:
1 edited

Legend:

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

    r2906 r2999  
    4444    int mode[3];
    4545    struct stat stat_buf;
    46     struct termios tos;
    4746
    4847    debug("pty is %s", ptyname);
     
    5655
    5756    child = mytrace_fork(parent);
    58     mytrace_write(parent, 1, "\x1b[H\x1b[2J", 7);
    59     mytrace_write(parent, 1, "\n[Process stolen by neercs]\n", 28);
    60     mytrace_tcgets(parent, 1, &tos);
    61     tos.c_lflag |= ICANON|ECHO;
    62     mytrace_tcsets(parent, 1, &tos);
    63     mytrace_close(parent, 1);
    64     mytrace_exit(parent, 0);
     57    mytrace_exec(parent, "/usr/bin/reset");
     58    mytrace_exit(parent, 0); /* In case the execve failed */
    6559    mytrace_detach(parent);
     60    mytrace_write(child, 1, "\x1b[H\x1b[2J", 7);
     61    mytrace_write(child, 1, "\n[Process stolen by neercs]\n", 28);
    6662    pid = mytrace_getpid(child);
    6763
Note: See TracChangeset for help on using the changeset viewer.