This is the mail archive of the cygwin-developers@cygwin.com 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: cgf's sandbox


On Fri, Jul 26, 2002 at 06:53:14PM +0100, Chris January wrote:
>> I promised Christopher January that I'd try to implement a cmdline
>> method for pinfo and I've got something in my sandbox that seems to work
>> ok.  It contacts the other process and says "give me your command line"
>> so there is no use of shared memory.
>Thanks for taking the time to do this.
>
>>
>> I implemented /proc/cmdline as a proof of concept and it seems to
>> work well.
>>
>> I can extend this mechanism to allowing /proc/pid/fd/n, too.
>That would be good. Someone wanted lsof to work on Cygwin - adding
>/proc/<pid>/fd should help a lot.

Right, that was what prompted me to work on this a little more.

>>
>> I have a few more things to tweak and then I can check this in.
>>
>> My sandbox also has the beginnings of a mount table generalization that
>> should allow /proc and /dev to be mounted as special filesystems, too.
>> That is in a much earlier stage of development, though.  I'm not entirely
>> satisfied with it yet.
>Perhaps this would be a good time for the implementation details for this
>could be opened up for wider discussion in case anyone has any comments?

There are too many rough spots for that yet.  I was just mentioning this
so that people would be aware.  Hopefully no one else will be tromping in
the mount code for a couple of weeks.

>One question - for some of the items in /proc/<pid> I have native (NT only)
>implementations as well (e.g. I have a native routine that gets the command
>line of a program, another that lists open files). What are peoples views on
>adding support for native processes to /proc? (These would also show up in
>ps, etc.) I was thinking of using an environment variable to switch between
>Cygwin processes only and all processes (like the -W switch of ps).

I dunno.  I have mixed feelings.  It's easy enough to get command line info
on NT systems, and maybe even 9x systems but once we expose these then will
people be expecting "kill" to work on the pid?  I guess if it is controlled
by a CYGWIN=procnative (or whatever) then the user would have made a conscious
decision to use this.  I kinda hate growing the dll to accommodate this but
it probably would be a nice feature.

cgf


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