public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* ps does not see all processes if used through a junctioned top level cygwin directory in cmd
@ 2018-01-25 17:02 Sabuj Pattanayek
  2018-01-25 17:35 ` Andrey Repin
  0 siblings, 1 reply; 3+ messages in thread
From: Sabuj Pattanayek @ 2018-01-25 17:02 UTC (permalink / raw)
  To: cygwin

Hi everyone,

I'm experiencing a strange issue where ps does not find all the processes
if it's run from a top level junction to the main cygwin directory in cmd :

On an older windows install I had cygwin under c:\cygwin64 , this time I
used chocolatey to install it and it put it under c:\tools\cygwin. To keep
things consistent so as not to break users I decided to make a junction :

 Directory of C:\

01/04/2018  03:01 PM    <JUNCTION>     cygwin64 [c:\tools\cygwin]

running ps from cygwin works fine :

$ ps -p 6376
      PID    PPID    PGID     WINPID   TTY         UID    STIME COMMAND
     6376       1    6376       5464  pty2      197608 23:52:31
/cygdrive/c/Windows/system32/cmd

however running it from the junctioned top level directory does not work :


C:\>c:\cygwin64\bin\ps -p 6376
c:\cygwin64\bin\ps -p 6376
      PID    PPID    PGID     WINPID   TTY         UID    STIME COMMAND

but when launched via the actual path it works properly :

C:\>c:\tools\cygwin\bin\ps -p 6376
c:\tools\cygwin\bin\ps -p 6376
      PID    PPID    PGID     WINPID   TTY         UID    STIME COMMAND
     6376       1    6376       5464  pty2      197608 23:52:31
/cygdrive/c/Windows/system32/cmd

any ideas what's causing this?

Thanks,
Sabuj

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: ps does not see all processes if used through a junctioned top level cygwin directory in cmd
  2018-01-25 17:02 ps does not see all processes if used through a junctioned top level cygwin directory in cmd Sabuj Pattanayek
@ 2018-01-25 17:35 ` Andrey Repin
  2018-01-25 17:41   ` Sabuj Pattanayek
  0 siblings, 1 reply; 3+ messages in thread
From: Andrey Repin @ 2018-01-25 17:35 UTC (permalink / raw)
  To: Sabuj Pattanayek, cygwin

Greetings, Sabuj Pattanayek!

> Hi everyone,

> I'm experiencing a strange issue where ps does not find all the processes
> if it's run from a top level junction to the main cygwin directory in cmd :

> On an older windows install I had cygwin under c:\cygwin64 , this time I
> used chocolatey to install it and it put it under c:\tools\cygwin. To keep
> things consistent so as not to break users I decided to make a junction :

>  Directory of C:\

> 01/04/2018  03:01 PM    <JUNCTION>     cygwin64 [c:\tools\cygwin]

> running ps from cygwin works fine :

> $ ps -p 6376
>       PID    PPID    PGID     WINPID   TTY         UID    STIME COMMAND
>      6376       1    6376       5464  pty2      197608 23:52:31
> /cygdrive/c/Windows/system32/cmd

> however running it from the junctioned top level directory does not work :


> C:\>c:\cygwin64\bin\ps -p 6376
> c:\cygwin64\bin\ps -p 6376
>       PID    PPID    PGID     WINPID   TTY         UID    STIME COMMAND

> but when launched via the actual path it works properly :

> C:\>c:\tools\cygwin\bin\ps -p 6376
> c:\tools\cygwin\bin\ps -p 6376
>       PID    PPID    PGID     WINPID   TTY         UID    STIME COMMAND
>      6376       1    6376       5464  pty2      197608 23:52:31
> /cygdrive/c/Windows/system32/cmd

> any ideas what's causing this?

I have no idea how did you do it, but I'm unable to see Windows processes like
that without -W.

[]$ ps -p 7636
      PID    PPID    PGID     WINPID   TTY         UID    STIME COMMAND

[]$ ps -Wp 7636
      PID    PPID    PGID     WINPID   TTY         UID    STIME COMMAND
     7636       0       0       7636  ?              0 15:47:38 C:\Program Files\Opera\opera.exe


-- 
With best regards,
Andrey Repin
Thursday, January 25, 2018 20:25:57

Sorry for my terrible english...


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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: ps does not see all processes if used through a junctioned top level cygwin directory in cmd
  2018-01-25 17:35 ` Andrey Repin
@ 2018-01-25 17:41   ` Sabuj Pattanayek
  0 siblings, 0 replies; 3+ messages in thread
From: Sabuj Pattanayek @ 2018-01-25 17:41 UTC (permalink / raw)
  To: cygwin

>
>
> I have no idea how did you do it, but I'm unable to see Windows processes
> like
> that without -W.
>

I'm sshd in. It's like :

cygwin sshd
|_ bash
   |_ cmd

so ps -p works, it's just that it doesn't work properly  unless i use the
actual path to ps from inside cmd which is weird.

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-01-25 17:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-25 17:02 ps does not see all processes if used through a junctioned top level cygwin directory in cmd Sabuj Pattanayek
2018-01-25 17:35 ` Andrey Repin
2018-01-25 17:41   ` Sabuj Pattanayek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).