support /proc/self/exe (needed for GDB to attach to an existing process)

This commit is contained in:
Balazs Gerofi
2016-01-19 18:22:45 +09:00
parent 172bf0a389
commit fa7a5ccd11
3 changed files with 104 additions and 28 deletions

View File

@ -146,9 +146,7 @@ void delete_proc_procfs_files(int pid)
snprintf(fname, PROCFS_NAME_MAX, "mcos%d/%d/auxv", osnum, pid);
delete_proc_procfs_file(pid, fname);
snprintf(fname, PROCFS_NAME_MAX, "mcos%d/%d", osnum, pid);
delete_proc_procfs_file(pid, fname);
/* NOTE: Directory is removed on the host when mcexec drops the executable */
dprintf("delete procfs files for pid %d: done\n", pid);
}