[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gdb] Re: my gdb/mi question. Don't forget fcntl.
From: |
SirVlad |
Subject: |
[Gdb] Re: my gdb/mi question. Don't forget fcntl. |
Date: |
Sun, 05 Jan 2003 10:00:43 +0300 |
roy wrote:
> 1. How can I connect to gdb/mi?
>
>
> ----------------------------------------------------------------------
>
> Date: Fri, 03 Jan 2003 22:42:45 +0300
> From: "SirVlad" <address@hidden>
> To: address@hidden
> Subject: [Gdb] How can I connect to gdb/mi?
>
> Hello!
> I am working at a program that should invoke gdb and manage it, make it run
> some commands and should store the results (which I hope to obtain via
> gdb/mi) in its data structures.
> How can I connect to GDB/MI?
> I do
> ...
> fork();
> //and then, in the daughter process,
> dup2();
> execlp(gdb);
>
> But dup2 closes stdin, so I get
> ~"Hangup detected on fd 0\n"
> ~"error detected on stdin\n"
>
> Is there any way to avoid this? Sorry for maybe my question is one of a
> newbie.
> Thank you for reading this.
> Cheers,
> --
> roy.
>
Thank you very much for reading this, I know the reason of my failure. After
pipe(), fork() and dup2() I should have called
fcntl() so that stdin remained open across exec().
Sorry for disturbance.
Cheers,
--
roy.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gdb] Re: my gdb/mi question. Don't forget fcntl.,
SirVlad <=