This is the mail archive of the cygwin-xfree@cygwin.com mailing list for the Cygwin XFree86 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Multiple XWin.exe programs loading and no xterm


On Thursday, April 07, 2005 1:21 PM, Alexander Gottwald wrote:

>On Thu, 7 Apr 2005, Phil Betts wrote:
>
>> People using startx will need a similar solution, but will be able to
>> use more elegant code instead of the unholy mess that CMD.EXE forced
>> me to write!
>
> No. Startx uses xinit and xinit tries to connect to the xserver in the
way 
> a client would do and repeats it until the server is ready.

I'll bow to your superior knowledge, it's about 10 years since I last
used startx in anger, and that was on Linux, where the X servers only
exit on closedown.  However (I'm just speculating here) the problems I
was having with xhost/xmodmap were partly that the client programs
"thought" they had executed correctly (i.e. no errors were raised and
the return code was zero).  Is it possible that xinit similarly thinks
all is well?

>> Of course, the *real* solution is for XWin to return only when it has
>> completed ALL of its initialisation.
>
> XWin does not "return" or anything like that. It's the way the process
start 
> works. You can either start a program and wait until it finished or
continue
> right after the program started running. There are no simple
mechanisms to 
> send notice about finished startup.

Reading between your lines, I assume you're saying that XWin is a
regular Windows program, and it's all down to the way that WinMain is
called.

On Unixen, one would initialise first and then fork, to detach the
server (or, more likely, leave it to the shell to place the server in
the background), but I guess this is not practicable in a Windows
environment.

I'm happy with my hack for now, so I'm certainly not pushing for a
change.

Feel free to incorporate it into the distributed startxwin.bat if you
want, although if you do, you may need to change the server to output
a key phrase (e.g. "XWin Initialisation Complete") that is always
output regardless of how it was started, instead of my more ad-hoc
approach.

Cheers,

Phil

**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]