1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

Keep on hacking on g13. A simple --create and --mount does now work.

A hacked up encfs is required.
This commit is contained in:
Werner Koch 2009-10-13 19:17:24 +00:00
parent 9b345f2a8a
commit 536b6ab09f
24 changed files with 1801 additions and 26 deletions

View file

@ -1102,3 +1102,28 @@ gnupg_spawn_process_detached (const char *pgmname, const char *argv[],
return 0;
#endif /* !HAVE_W32_SYSTEM*/
}
/* Kill a process; that is send an appropriate signal to the process.
gnupg_wait_process must be called to actually remove the process
from the system. An invalid PID is ignored. */
void
gnupg_kill_process (pid_t pid)
{
#ifdef HAVE_W32_SYSTEM
/* Older versions of libassuan set PID to 0 on Windows to indicate
an invalid value. */
if (pid != (pid_t) INVALID_HANDLE_VALUE && pid != 0)
{
HANDLE process = (HANDLE) pid;
/* Arbitrary error code. */
TerminateProcess (process, 1);
}
#else
if (pid != (pid_t)(-1))
{
kill (pid, SIGTERM);
}
#endif
}