Skip to content

Is there a way to capture 'stderr' / 'stdout' from the ptraced program? #79

Open
@nrathaus

Description

@nrathaus

Let assume I have this code (it is incomplete):

pid = createChild(arguments, False, env)
dbg = PtraceDebugger()
process = dbg.addProcess(pid, is_attached)
process.cont()

There seems to be no way to handle the stderr and stdout, there are something called pass_fd in the createChild function, but there is no documentation (that I can find) how to do it, trying to use os.pipe() on it seems to not work os.read(..) seems to be blocked

Can you provide an example? or direct me in the right way?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions