Re: Console screen from spawn_process



On Mon, 2008-10-20 at 17:18 -0200, Paulo Flabiano Smorigo wrote:
> Hi Armin,
> 
> Thanks for the reply and the code. I saw it and notice that you don't
> use the stdin of the spawn process. In my program I will need this.
> 
> You sad that even if I compile with -mwindow I will have stdin and
> stdout. So I compile and doing some tests I discover that the stdout
> is working but if I try to send commands to stdin with the command
> "write(&stdin, "my command", strlen(size_of_my_command))" there is no
> result.

So does this work when the console window is enabled?

I'm not sure what your "stdin" is, but the write call normally takes an
integer, not a pointer to something.

I can also imagine that your command needs to be terminated with a
newline character, "\n". Maybe the data is cached until one is
encountered. But that's only a guess.

> I trying to figure out what I'm doing wrong... Maybe you could help
> me...
> 
> Thanks again...
> Paulo Flabiano Smorigo

Armin



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]