Windows 64-bit: functions which use pid_t
Open, WishlistPublic

Description

This entry is basically my memorandum so that I won't make mistake.

HANDLE for a process, as a type, cannot be represented by an int.
As long as the value of HANDLE is small (fits in 32-bit), it works.
In the long run, it's better to have API, with something like gpgrt_process_t,
where gpgrt_process_t can represent HANDLE as a type.

pid_t of getpid and process HANDLE is different thing.

gniibe created this task.Jul 25 2019, 3:53 AM

APIs which need revise (where we use pid_t):

GnuPG:

  • gnupg_spawn_process
  • gnupg_spawn_process_fd
  • gnupg_wait_process
  • gnupg_wait_processes
  • gnupg_release_process
  • gnupg_kill_process

libassuan:

  • assuan_waitpid
  • assuan_socket_connect
  • assuan_get_pid
gniibe claimed this task.Jul 25 2019, 8:21 AM
werner added a subscriber: werner.Jul 30 2019, 6:58 PM

Actually my not-written-down plan is to use a Windows like style for tracking a process. This will also resolve the pid rollover problem. It shall all go into gpgrt of course.

werner triaged this task as Wishlist priority.Jul 31 2019, 12:39 PM

Lacking another category for such things, I dropped the priority.