Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2000-08-23 18:53:25 +0400
committerChristopher Faylor <me@cgf.cx>2000-08-23 18:53:25 +0400
commitc19e7ba723bb4246a375b41678c2b730718d00e4 (patch)
tree359b980a51f84418c6769ce19f3f2b4ee1639a11 /winsup/cygwin/pinfo.h
parent644b7f266b464e4e336050ed75282f83b83ef71a (diff)
* include/sys/cygwin.h: Protect class definitions.
Diffstat (limited to 'winsup/cygwin/pinfo.h')
-rw-r--r--winsup/cygwin/pinfo.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/winsup/cygwin/pinfo.h b/winsup/cygwin/pinfo.h
index b8ee9140b..f84659813 100644
--- a/winsup/cygwin/pinfo.h
+++ b/winsup/cygwin/pinfo.h
@@ -117,7 +117,7 @@ class pinfo
_pinfo *child;
int destroy;
public:
- void init (pid_t n, DWORD create = 0);
+ void init (pid_t n, DWORD create = 0, HANDLE h = NULL);
pinfo () {}
pinfo (_pinfo *x): child (x) {}
pinfo (pid_t n) {init (n);}
@@ -127,7 +127,7 @@ public:
if (h)
{
UnmapViewOfFile (child);
- CloseHandle (h);
+ ForceCloseHandle1 (h, pinfo_shared_handle);
h = NULL;
}
}
@@ -145,7 +145,9 @@ public:
int operator == (char *x) const {return (char *) child == x;}
_pinfo *operator * () const {return child;}
operator _pinfo * () const {return child;}
+ // operator bool () const {return (int) h;}
void remember () {destroy = 0; proc_subproc (PROC_ADDCHILD, (DWORD) this);}
+ HANDLE shared_handle () {return h;}
};
#define ISSTATE(p, f) (!!((p)->process_state & f))
@@ -168,5 +170,7 @@ cygwin_pid (pid_t pid)
{
return (pid_t) (os_being_run == winNT) ? pid : -(int) pid;
}
-void __stdcall pinfo_init (PBYTE);
+
+void __stdcall pinfo_init (BYTE *);
+void __stdcall set_myself (pid_t pid, HANDLE h = NULL);
extern pinfo myself;