* external.cc: Move pids declaration to file scope and use less enthusiastic
constructor. * pinfo.h (winpids::winpids): Remove default setting. * fhandler_fifo.cc (fhandler_fifo::open_not_mine): Accommodate removal of default setting. * fhandler_proc.cc (fhandler_proc::readdir): Ditto.
This commit is contained in:
parent
24515d6563
commit
ac437c3e0c
@ -1,3 +1,12 @@
|
|||||||
|
2005-05-18 Christopher Faylor <cgf@timesys.com>
|
||||||
|
|
||||||
|
* external.cc: Move pids declaration to file scope and use less
|
||||||
|
enthusiastic constructor.
|
||||||
|
* pinfo.h (winpids::winpids): Remove default setting.
|
||||||
|
* fhandler_fifo.cc (fhandler_fifo::open_not_mine): Accommodate removal
|
||||||
|
of default setting.
|
||||||
|
* fhandler_proc.cc (fhandler_proc::readdir): Ditto.
|
||||||
|
|
||||||
2005-05-18 Christopher Faylor <cgf@timesys.com>
|
2005-05-18 Christopher Faylor <cgf@timesys.com>
|
||||||
|
|
||||||
* cygtls.h (_local_storage::unknown_thread_name): New buffer.
|
* cygtls.h (_local_storage::unknown_thread_name): New buffer.
|
||||||
|
@ -32,6 +32,8 @@ details. */
|
|||||||
void *hook_cygwin (const char *, const void *);
|
void *hook_cygwin (const char *, const void *);
|
||||||
child_info *get_cygwin_startup_info ();
|
child_info *get_cygwin_startup_info ();
|
||||||
|
|
||||||
|
static winpids pids;
|
||||||
|
|
||||||
static external_pinfo *
|
static external_pinfo *
|
||||||
fillout_pinfo (pid_t pid, int winpid)
|
fillout_pinfo (pid_t pid, int winpid)
|
||||||
{
|
{
|
||||||
@ -41,7 +43,6 @@ fillout_pinfo (pid_t pid, int winpid)
|
|||||||
if ((nextpid = !!(pid & CW_NEXTPID)))
|
if ((nextpid = !!(pid & CW_NEXTPID)))
|
||||||
pid ^= CW_NEXTPID;
|
pid ^= CW_NEXTPID;
|
||||||
|
|
||||||
static winpids pids (0);
|
|
||||||
|
|
||||||
static unsigned int i;
|
static unsigned int i;
|
||||||
if (!pids.npids || !nextpid)
|
if (!pids.npids || !nextpid)
|
||||||
|
@ -89,7 +89,7 @@ fhandler_fifo::close_one_end ()
|
|||||||
int
|
int
|
||||||
fhandler_fifo::open_not_mine (int flags)
|
fhandler_fifo::open_not_mine (int flags)
|
||||||
{
|
{
|
||||||
winpids pids;
|
winpids pids ((DWORD) 0);
|
||||||
int res = 0;
|
int res = 0;
|
||||||
|
|
||||||
for (unsigned i = 0; i < pids.npids; i++)
|
for (unsigned i = 0; i < pids.npids; i++)
|
||||||
|
@ -200,7 +200,7 @@ fhandler_proc::readdir (DIR * dir)
|
|||||||
{
|
{
|
||||||
if (dir->__d_position >= PROC_LINK_COUNT)
|
if (dir->__d_position >= PROC_LINK_COUNT)
|
||||||
{
|
{
|
||||||
winpids pids;
|
winpids pids ((DWORD) 0);
|
||||||
int found = 0;
|
int found = 0;
|
||||||
for (unsigned i = 0; i < pids.npids; i++)
|
for (unsigned i = 0; i < pids.npids; i++)
|
||||||
if (found++ == dir->__d_position - PROC_LINK_COUNT)
|
if (found++ == dir->__d_position - PROC_LINK_COUNT)
|
||||||
|
@ -221,9 +221,10 @@ public:
|
|||||||
DWORD npids;
|
DWORD npids;
|
||||||
inline void reset () { npids = 0; release (); }
|
inline void reset () { npids = 0; release (); }
|
||||||
void set (bool winpid);
|
void set (bool winpid);
|
||||||
|
winpids (): enum_processes (&winpids::enum_init) {}
|
||||||
winpids (int): pinfo_access (0), enum_processes (&winpids::enum_init)
|
winpids (int): pinfo_access (0), enum_processes (&winpids::enum_init)
|
||||||
{ reset (); }
|
{ reset (); }
|
||||||
winpids (DWORD acc = 0): pidlist (NULL), npidlist (0), pinfolist (NULL),
|
winpids (DWORD acc): pidlist (NULL), npidlist (0), pinfolist (NULL),
|
||||||
enum_processes (&winpids::enum_init), npids (0)
|
enum_processes (&winpids::enum_init), npids (0)
|
||||||
{
|
{
|
||||||
pinfo_access = acc;
|
pinfo_access = acc;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user