/[emacs]/emacs/lib-src/ntlib.c
ViewVC logotype

Diff of /emacs/lib-src/ntlib.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.8 by andrewi, Tue Aug 22 21:22:20 2000 UTC revision 1.8.18.1 by miles, Fri Apr 4 06:19:55 2003 UTC
# Line 59  getppid(void) Line 59  getppid(void)
59    DWORD result;    DWORD result;
60    
61    ppid = getenv ("EM_PARENT_PROCESS_ID");    ppid = getenv ("EM_PARENT_PROCESS_ID");
62    if (!ppid)    if (!ppid)
63      {      {
64        printf("no pid.\n");        printf("no pid.\n");
65        return 0;        return 0;
66      }      }
67    else    else
68      {      {
69        getppid_ppid = atoi (ppid);        getppid_ppid = atoi (ppid);
70      }      }
71    
72    if (!getppid_parent)    if (!getppid_parent)
73      {      {
74        getppid_parent = OpenProcess (SYNCHRONIZE, FALSE, atoi(ppid));        getppid_parent = OpenProcess (SYNCHRONIZE, FALSE, atoi(ppid));
75        if (!getppid_parent)        if (!getppid_parent)
76          {          {
77            printf ("Failed to open handle to parent process: %d\n",            printf ("Failed to open handle to parent process: %d\n",
78                   GetLastError());                   GetLastError());
# Line 81  getppid(void) Line 81  getppid(void)
81      }      }
82    
83    result = WaitForSingleObject (getppid_parent, 0);    result = WaitForSingleObject (getppid_parent, 0);
84    switch (result)    switch (result)
85      {      {
86      case WAIT_TIMEOUT:      case WAIT_TIMEOUT:
87        /* The parent is still alive.  */        /* The parent is still alive.  */
# Line 188  fchown (int fd, int uid, int gid) Line 188  fchown (int fd, int uid, int gid)
188  }  }
189    
190  /* Place a wrapper around the MSVC version of ctime.  It returns NULL  /* Place a wrapper around the MSVC version of ctime.  It returns NULL
191     on network directories, so we handle that case here.       on network directories, so we handle that case here.
192     (Ulrich Leodolter, 1/11/95).  */     (Ulrich Leodolter, 1/11/95).  */
193  char *  char *
194  sys_ctime (const time_t *t)  sys_ctime (const time_t *t)

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.8.18.1

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26