"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "attach.c" between
reptyr-reptyr-0.7.0.tar.gz and reptyr-reptyr-0.8.0.tar.gz

About: reptyr is a utility for taking an existing running program and attaching it to a new terminal.

attach.c  (reptyr-reptyr-0.7.0):attach.c  (reptyr-reptyr-0.8.0)
skipping to change at line 120 skipping to change at line 120
if (err < 0) { if (err < 0) {
error("Failed to setsid: %s", strerror(-err)); error("Failed to setsid: %s", strerror(-err));
move_process_group(child, dummy.pid, child->pid); move_process_group(child, dummy.pid, child->pid);
goto out_kill; goto out_kill;
} }
debug("Did setsid()"); debug("Did setsid()");
out_kill: out_kill:
kill(dummy.pid, SIGKILL); kill(dummy.pid, SIGKILL);
ptrace_wait(&dummy);
ptrace_detach_child(&dummy); ptrace_detach_child(&dummy);
ptrace_wait(&dummy);
do_syscall(child, wait4, dummy.pid, 0, WNOHANG, 0, 0, 0); do_syscall(child, wait4, dummy.pid, 0, WNOHANG, 0, 0, 0);
return err; return err;
} }
static int do_dup2(struct ptrace_child *child, int oldfd, int newfd) { static int do_dup2(struct ptrace_child *child, int oldfd, int newfd) {
if (oldfd == newfd) { if (oldfd == newfd) {
return 0; return 0;
} }
if (ptrace_syscall_numbers(child)->nr_dup2 != -1) { if (ptrace_syscall_numbers(child)->nr_dup2 != -1) {
return do_syscall(child, dup2, oldfd, newfd, 0, 0, 0, 0); return do_syscall(child, dup2, oldfd, newfd, 0, 0, 0, 0);
 End of changes. 2 change blocks. 
1 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)