void (*server_proc) (void *) = (void (*)(void *))argp;
server_proc(NULL);
dpf(("rx_pthread.c: server_entry: Server proc returned unexpectedly\n"));
- exit(1);
- return NULL;
+ return (void *) -1; /* reused as return value, see pthread(3) */
}
/*
/* assuming relative path name */
if (getcwd(pathname, 256) == NULL) {
free(inbuffer);
- printf("getwd failed; exiting\n");
- exit(1);
+ printf("getwd failed\n");
+ return -1;
}
strcpy(pathname + strlen(pathname), "/");
strcat(pathname, path);
"%s: can't find cell %s's hosts in %s/%s\n",
funcName, cellName, AFSDIR_SERVER_ETC_DIRPATH,
AFSDIR_CELLSERVDB_FILE);
- exit(1);
+ return -1;
}
} else { /* not -localauth */
tdir = afsconf_Open(confDir);
fprintf(stderr,
"%s: can't get local cellname, check %s/%s\n",
funcName, confDir, AFSDIR_THISCELL_FILE);
- exit(1);
+ return -1;
}
cellName = cellstr;
}
fprintf(stderr,
"%s: can't find cell %s's hosts in %s/%s\n",
funcName, cellName, confDir, AFSDIR_CELLSERVDB_FILE);
- exit(1);
+ return -1;
}
if (noAuthFlag) /* -noauth */
scIndex = 0;
default:
fprintf(stderr, "%s: unsupported security index %d\n",
funcName, scIndex);
- exit(1);
+ return -1;
break;
}
}
fprintf(stderr,
"%s: info.numServers=%d (> maxservers=%d)\n",
funcName, info.numServers, maxservers);
- exit(1);
+ return -1;
}
for (i = 0; i < info.numServers; i++) {
serverconns[i] =