version 1.171, 2010/11/21 01:01:13 |
version 1.172, 2011/06/03 01:37:40 |
|
|
static void |
static void |
check_parent_exists(void) |
check_parent_exists(void) |
{ |
{ |
if (parent_pid != -1 && kill(parent_pid, 0) < 0) { |
/* |
|
* If our parent has exited then getppid() will return (pid_t)1, |
|
* so testing for that should be safe. |
|
*/ |
|
if (parent_pid != -1 && getppid() != parent_pid) { |
/* printf("Parent has died - Authentication agent exiting.\n"); */ |
/* printf("Parent has died - Authentication agent exiting.\n"); */ |
cleanup_socket(); |
cleanup_socket(); |
_exit(2); |
_exit(2); |