This is the mail archive of the cygwin mailing list for the Cygwin 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: Get the cygwin PID of a Win PID


On Jun 27 13:58, Borislav Ivanov wrote:
> Thank you again,
> 
> I looked further and found out that this happens when I start the
> mysql-nt application from bash.
> 
> Here's the result when I start it from cmd - only one process listed
> with equal cywgin and win PIDs:
> 
> D:>mysql\bin\mysqld-nt.exe --defaults-file=conf\mysql.conf
> 
> bash-3.2$ ps -W | grep mysql
>      6044       0       0       6044    ?    0 13:24:25
> D:\mysql\bin\mysqld-nt.exe
> 	
> And then the bash version:
> 	
> bash-3.2$ mysql/bin/mysqld-nt.exe --defaults-file=conf/mysql.conf
> 
> bash-3.2$ ps -W | grep mysql
>       992    4572     992       5900  con  500 14:35:13
> /drives/d/mysql/bin/mysqld-nt
>      5900       0       0       5900    ?    0 14:35:14
> d:\mysql\bin\mysqld-nt.exe
> 
> The funny thing is that with cygwin 1.3 both commands invoked only one
> process. This is mysql 5.0.38. My question is: Is there a way to make
> this work like in 1.3 (producing only one process with the same pid I
> can use later), or I should look for a workaround?

The process is apparently a native Windows process.  I don't know why it
shows up twice when started from bash but since it's a native process,
Cygwin's kill will not work as expected on it.  1.3 is long gone, and
things have considerably changed since then.  I don't know the exact
difference, but kill() is supposed to send a POSIX signal, which native
applications have no idea about.  You should rather use the native
taskkill command to kill native processes.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


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