diff options
author | Christopher Faylor <me@cgf.cx> | 2003-09-17 01:15:56 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2003-09-17 01:15:56 +0000 |
commit | deb648cc8b95ec4b7a5b604d958abd338347811f (patch) | |
tree | a0ca911611ebeb6b0b74ec3cbe09dfd230af5380 /winsup/cygwin/pinfo.h | |
parent | 1498189ca897347251470f3dd35e97d2f20f0f4b (diff) | |
download | newlib-deb648cc8b95ec4b7a5b604d958abd338347811f.zip newlib-deb648cc8b95ec4b7a5b604d958abd338347811f.tar.gz newlib-deb648cc8b95ec4b7a5b604d958abd338347811f.tar.bz2 |
* pinfo.h (winpids::pid_access): New element.
(winpids::winpids): Rejigger to set pinfo_access.
* pinfo.cc (winpids::add): Try to open shared memory region with supplied
pinfo_access first, then default to readonly.
* fhandler_termios.cc (tty_min::kill_pgrp): When getting list of pids to work
with, suggest opening with PID_MAP_RW.
* signal.cc (kill_pgrp): Ditto.
* sigproc.cc (sig_send): Perform a write check on todo prior to attempting to
increment it. Return EACCES if we can't write to it.
Diffstat (limited to 'winsup/cygwin/pinfo.h')
-rw-r--r-- | winsup/cygwin/pinfo.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/winsup/cygwin/pinfo.h b/winsup/cygwin/pinfo.h index e437328..518252c 100644 --- a/winsup/cygwin/pinfo.h +++ b/winsup/cygwin/pinfo.h @@ -197,6 +197,7 @@ class winpids DWORD *pidlist; DWORD npidlist; pinfo *pinfolist; + DWORD pinfo_access; // access type for pinfo open DWORD (winpids::* enum_processes) (bool winpid); DWORD enum_init (bool winpid); DWORD enumNT (bool winpid); @@ -207,9 +208,14 @@ public: DWORD npids; inline void reset () { npids = 0; release (); } void set (bool winpid); - winpids (int): enum_processes (&winpids::enum_init) { reset (); } - winpids (): pidlist (NULL), npidlist (0), pinfolist (NULL), - enum_processes (&winpids::enum_init), npids (0) { set (0); } + winpids (int): pinfo_access (0), enum_processes (&winpids::enum_init) + { reset (); } + winpids (DWORD acc = 0): pidlist (NULL), npidlist (0), pinfolist (NULL), + enum_processes (&winpids::enum_init), npids (0) + { + pinfo_access = acc; + set (0); + } inline DWORD& winpid (int i) const {return pidlist[i];} inline _pinfo *operator [] (int i) const {return (_pinfo *) pinfolist[i];} ~winpids (); |