[684] in Zephyr_Bugs
bug report
daemon@ATHENA.MIT.EDU (Dejan Vucinic)
Thu Aug 10 15:36:07 1995
Date: Thu, 10 Aug 1995 14:35:38 -0500
From: Dejan Vucinic <dejan@mit1.fnal.gov>
To: bug-zephyr@MIT.EDU
Hello,
zlocate.1 says:
DIAGNOSTICS
zlocate exits with status zero (0) if at least one user
was found, and one (1) if no users were found.
This is not true of version 2.0.2. Here's a patch:
Regards,
--dv
*** zlocate.c.orig Fri Jul 7 16:55:59 1995
--- zlocate.c Thu Aug 10 14:30:22 1995
***************
*** 72,78 ****
{
char user[BUFSIZ],*whichuser;
ZAsyncLocateData_t ald;
! int retval,i,numlocs,loc,auth;
ZNotice_t notice;
#ifdef _POSIX_VERSION
struct sigaction sa;
--- 72,78 ----
{
char user[BUFSIZ],*whichuser;
ZAsyncLocateData_t ald;
! int retval,i,numlocs,numfound,loc,auth;
ZNotice_t notice;
#ifdef _POSIX_VERSION
struct sigaction sa;
***************
*** 119,124 ****
--- 119,125 ----
}
numleft = numusers;
+ numfound = 0;
i = 0;
for (loc = 0; loc < argc; loc++) {
***************
*** 142,149 ****
--- 143,152 ----
exit(1);
}
print_locs(user,numlocs);
+ numfound += numlocs;
}
}
+ if (numfound == 0) exit(1);
if (parallel) {
#ifdef _POSIX_VERSION