People don't care about implementation details.  They care about what is 
running on the system (the WHOLE system).  They want kill and ps to show what's 
running on the system, not what cygwin "thinks" is running.  Since exec() 
creates a new process on windows, that's more relevant for these tools.

You have to admit, ps -ef showing only a few processes out of a houndred is a 
serious handicap for these tools and any scripts trying to maintain 
compatibility across windows and unix/linux.  Also, the man page for -e (on 
unix/linux) says that -e means "every process on the system".

It will be more useful to show all windows processes, or if you want to be 
smart about it, all windows processes minus all the ones cygwin knows are the 
result of exec().  However, I think the exec() distinction doesn't really 
matter (certainly not to most people), since, how often will you really see it 
and how often will it really matter?  I don't see what's the big deal to allow 
ps and kill to see all windows processes by default.

How about let the user control how this works without having to change scripts 
or typing habits?  Can you add a new option via the CYGWIN environment 
variable, something like [no]allprocs which kill and ps can look at instead of 
-f and -W options (although you can keep those for compatibility with existing 
cygwin releases)?  Of course, I think the default behavior should be allprocs, 
since I believe almost all users will prefer this behavior.

-Don


-----Original Message-----
From: Andy Koppe [mailto:andy.ko...@gmail.com] 
Sent: Thursday, January 21, 2010 9:02 PM
To: d...@beusee.com; cygwin@cygwin.com
Subject: Re: Why require ps -W and kill -f

2010/1/22 Don Beusee:
> ps -e on Unix displays �every process running on the system�.� This command
> doesn't do that under cygwin.� Why should it be necessary to supply -W to
> see all processes running on the system?

Because those processes are not Cygwin/Unix processes. In particular,
they do not have Cygwin process IDs. Cygwin PIDs and Windows PIDs are
different concepts (even though they often coincide), and that's
because multiple windows processes can be needed to emulate one Cygwin
process. For example, when calling exec(), the new program is
conceptually executed in the same Cygwin process, but actually a new
Windows process has to be created since Windows doesn't allow a
process to change executable.

Andy


--
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

Reply via email to