On Wed, Apr 15, 2015 at 08:29:30PM +0200, Johannes Sixt wrote:
  | Windows does not have process groups. It is, therefore, the simplest
  | to pretend that each process is in its own process group.
  | 
  |  [...]
  | 
  | diff --git a/compat/mingw.h b/compat/mingw.h
  | index 7b523cf..a552026 100644
  | @@ -118,6 +116,12 @@ static inline int sigaddset(sigset_t *set, int signum)
  |  #define SIG_UNBLOCK 0
  |  static inline int sigprocmask(int how, const sigset_t *set, sigset_t 
*oldset)
  |  { return 0; }
  | +static inline pid_t getppid(void)
  | +{ return 1; }
  | +static inline pid_t getpgid(pid_t pid)
  | +{ return pid == 0 ? getpid() : pid; }
  | +static inline pid_t tcgetpgrp(int fd)
  | +{ return getpid(); }


This appears to be similar to the approach that tcsh uses too;
return the current process ID for the process group ID.
See https://github.com/tcsh-org/tcsh/blob/master/win32/ntport.h
for tcsh's implementation of getpgrp() (a variation of getpgid())
and tcgetpgrp().


regards,
Luke.

Attachment: pgpyN0nrBi1n3.pgp
Description: PGP signature

Reply via email to