Re: Get the cygwin PID of a Win PID

2008-06-27 Thread Borislav Ivanov
>>> bash-3.2$ ps -W | grep mysql >>> 9924572 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 > >ps -W does not have a perfect algorithm for knowing when to mask the >windows

Re: Get the cygwin PID of a Win PID

2008-06-27 Thread Christopher Faylor
On Fri, Jun 27, 2008 at 01:30:19PM +0200, Corinna Vinschen wrote: >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 pro

Re: Get the cygwin PID of a Win PID

2008-06-27 Thread Corinna Vinschen
On Jun 27 12:20, Markus Hoenicka wrote: > Quoting Corinna Vinschen >> On Jun 27 10:31, Borislav Ivanov wrote: >>> ps output is: >>> >>> D:\>ps -W | grep mysql >>> 2744 11384 1980? 18 15:07:22 >>> /drives/c/mysql/bin/mysqld-nt >>> 1980 0 0 1980?

Re: Get the cygwin PID of a Win PID

2008-06-27 Thread Markus Hoenicka
Quoting Corinna Vinschen <[EMAIL PROTECTED]>: On Jun 27 10:31, Borislav Ivanov wrote: ps output is: D:\>ps -W | grep mysql 2744 11384 1980? 18 15:07:22 /drives/c/mysql/bin/mysqld-nt 1980 0 0 1980?0 15:07:23 c:\mysql\bin\mysqld-nt.exe

Re: Get the cygwin PID of a Win PID

2008-06-27 Thread Corinna Vinschen
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

Re: Get the cygwin PID of a Win PID

2008-06-27 Thread Borislav Ivanov
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 | gr

Re: Get the cygwin PID of a Win PID

2008-06-27 Thread Corinna Vinschen
On Jun 27 10:31, Borislav Ivanov wrote: > ps output is: > > D:\>ps -W | grep mysql > 2744 11384 1980? 18 15:07:22 > /drives/c/mysql/bin/mysqld-nt > 1980 0 0 1980?0 15:07:23 > c:\mysql\bin\mysqld-nt.exe What sort of bastard process is that,

Re: Get the cygwin PID of a Win PID

2008-06-27 Thread Borislav Ivanov
Thank you Reini. However when I use this function it returns -1. Here's my program, sample output and strace snip: #include #include #include #include #include pid_t pid; pid_t cygwin_pid; int res; extern pid_t cygwin_winpid_to_pid(int); int main( int argc, char **argv) {

Re: Get the cygwin PID of a Win PID

2008-06-26 Thread Reini Urban
2008/6/26 Borislav Ivanov: > I'm currently updating cygwin from 1.3.22 to 1.5.25 and I encountered > a problem with Winpids/Cygwinpids. I have a custom tool that checks if > a process is running by invoking kill(PID, 0). > I searched through the list, but found only transition from cygwinpid > to w

Get the cygwin PID of a Win PID

2008-06-26 Thread Borislav Ivanov
Hello, I'm currently updating cygwin from 1.3.22 to 1.5.25 and I encountered a problem with Winpids/Cygwinpids. I have a custom tool that checks if a process is running by invoking kill(PID, 0). The PID is retrieved from a PID file which all applications write on startup. On 1.3 I get this: d:\>p