mirror of
https://github.com/radareorg/radare2.git
synced 2024-11-27 07:00:30 +00:00
parent
d3bbfa95c6
commit
f31e6ca527
@ -1600,7 +1600,7 @@ static int cmd_open(void *data, const char *input) {
|
||||
{
|
||||
int fd = (int)r_num_math (core->num, input + 1);
|
||||
if (!r_core_file_close_fd (core, fd)) {
|
||||
eprintf ("Unable to find filedescriptor %d\n", fd);
|
||||
eprintf ("Unable to find file descriptor %d\n", fd);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -276,6 +276,10 @@ static int __close(RIODesc *desc) {
|
||||
RIOPtrace *riop = desc->data;
|
||||
desc->data = NULL;
|
||||
long ret = r_io_ptrace (desc->io, PTRACE_DETACH, pid, 0, 0);
|
||||
if (errno == ESRCH) {
|
||||
// process does not exist, may have been killed earlier -- continue as normal
|
||||
ret = 0;
|
||||
}
|
||||
free (riop);
|
||||
return ret;
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ dbg:///bin/ls
|
||||
EOF
|
||||
RUN
|
||||
|
||||
NAME= ood after open in debug mode
|
||||
NAME=ood after open in debug mode
|
||||
FILE=../bins/elf/analysis/x86-helloworld-gcc
|
||||
ARGS=-d
|
||||
CMDS=<<EOF
|
||||
@ -52,3 +52,19 @@ EXPECT=<<EOF
|
||||
Hello world!
|
||||
EOF
|
||||
RUN
|
||||
|
||||
NAME=ood & om
|
||||
FILE=../bins/elf/analysis/x86-helloworld-gcc
|
||||
ARGS=-d
|
||||
CMDS=<<EOF
|
||||
om
|
||||
?e
|
||||
ood > /dev/null
|
||||
om
|
||||
EOF
|
||||
EXPECT=<<EOF
|
||||
1 fd: 3 +0x00000000 0x00000000 - 0x7ffffffffffffffe rwx
|
||||
|
||||
1 fd: 4 +0x00000000 0x00000000 - 0x7ffffffffffffffe rwx
|
||||
EOF
|
||||
RUN
|
||||
|
Loading…
Reference in New Issue
Block a user