"Dimitrie O. Paun" a écrit :
On November 21, 2002 03:25 pm, Eric Pouech wrote:
This seems complicated... :)
that's why we need to simplify what we want to do ;-))
:)))))
this won't work, because CreateProcess passes from parent to child some context information the child get it from wineserver using its parent process id in your case, wine myprog.exe ppid will we xterm, not the parent process
That's fine, I was just saying what the process _looks_ like from outside. That is to say, it's quite counterintuitive why you can not pick your console, as in some cases, it works just fine... (ie. xterm -e "wine...").
So obviously we can't simply do: CreateProcess("xterm -e 'wine myprog.exe'")
but rather something like (in theory): p1 = CreateProcess("xterm") p2 = CreateProcess("myprog.exe'") and somehow tell p2 about p1, so it can bind to it.
well, that won't work out of the box... p2 won't get the right context at start up, binding won't be that easy (basically, p2 needs to inherit p1 stdin & stdout, which is rather easy if p2 is a child of p1 - and then back to square one -...)
assuming this would work (I'm not even sure it'll work in all cases),
Now, this is the point, it seems, where you're saying that we don't know stuff about p1, and I'm saying that we've just created it ourselves, what is it that we don't know? Or am I completely off?
this won't support the case where the app creates it own console after it has started this won't cover the case where, in a X11-less configuration, you try to open two consoles on the same terminal (by two different processes ... A+