This is the mail archive of the
cygwin-xfree
mailing list for the Cygwin XFree86 project.
Re: Checking if the X Server is running
- From: Holger Krull <holger dot krull at gmx dot de>
- To: cygwin-xfree at cygwin dot com
- Date: Tue, 02 Oct 2007 10:53:05 +0200
- Subject: Re: Checking if the X Server is running
- References: <328472.13473.qm@web27013.mail.ukl.yahoo.com>
- Reply-to: cygwin-xfree at cygwin dot com
As someone pointed out in another post the sequence ps |grep has a risk of finding grep itself in the list. The command pgrep combines both and hasn't that risk.
> Thanks Holger. Now this works perfectly. It does open
> up a Windows cmd window â which remains open until I
> finish with my app â but I can live with that.
That can be avoided by dual nested start like:
C:\cygwin\bin\bash.exe -c -l 'run bash -c -l "Xwin.exe :0 -query 192.168.11.1 -once &" '
The first bash closes after the command and so does the cmd window which started it. The & at the end is important to get a independend process.
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://x.cygwin.com/docs/
FAQ: http://x.cygwin.com/docs/faq/