[BACK]Return to ssh-agent.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / ssh

Diff for /src/usr.bin/ssh/ssh-agent.c between version 1.28 and 1.29

version 1.28, 2000/04/14 10:30:33 version 1.29, 2000/04/19 07:05:49
Line 46 
Line 46 
 int max_fd = 0;  int max_fd = 0;
   
 /* pid of shell == parent of agent */  /* pid of shell == parent of agent */
 int parent_pid = -1;  pid_t parent_pid = -1;
   
 /* pathname and directory for AUTH_SOCKET */  /* pathname and directory for AUTH_SOCKET */
 char socket_name[1024];  char socket_name[1024];
Line 460 
Line 460 
 void  void
 check_parent_exists(int sig)  check_parent_exists(int sig)
 {  {
         if (kill(parent_pid, 0) < 0) {          if (parent_pid != -1 && kill(parent_pid, 0) < 0) {
                 /* printf("Parent has died - Authentication agent exiting.\n"); */                  /* printf("Parent has died - Authentication agent exiting.\n"); */
                 exit(1);                  exit(1);
         }          }
Line 546 
Line 546 
                 }                  }
                 pid = atoi(pidstr);                  pid = atoi(pidstr);
                 if (pid < 1) {  /* XXX PID_MAX check too */                  if (pid < 1) {  /* XXX PID_MAX check too */
                   /* Yes, PID_MAX check please */
                         fprintf(stderr, "%s=\"%s\", which is not a good PID\n",                          fprintf(stderr, "%s=\"%s\", which is not a good PID\n",
                                 SSH_AGENTPID_ENV_NAME, pidstr);                                  SSH_AGENTPID_ENV_NAME, pidstr);
                         exit(1);                          exit(1);

Legend:
Removed from v.1.28  
changed lines
  Added in v.1.29