Don't output extraneous tab
Submitted by: Garance A Drosehn <gad@eclipse.its.rpi.edu>
This commit is contained in:
parent
e3f3db531c
commit
dc36a1d5ad
@ -821,13 +821,17 @@ prstat()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
(void) close(fd);
|
(void) close(fd);
|
||||||
putchar('\t');
|
/* print out the contents of the status file, if it exists */
|
||||||
(void) sprintf(line, "%s/%s", SD, ST);
|
(void) sprintf(line, "%s/%s", SD, ST);
|
||||||
fd = open(line, O_RDONLY);
|
fd = open(line, O_RDONLY);
|
||||||
if (fd >= 0) {
|
if (fd >= 0) {
|
||||||
(void) flock(fd, LOCK_SH);
|
(void) flock(fd, LOCK_SH);
|
||||||
while ((i = read(fd, line, sizeof(line))) > 0)
|
(void) fstat(fd, &stbuf);
|
||||||
(void) fwrite(line, 1, i, stdout);
|
if (stbuf.st_size > 0) {
|
||||||
|
putchar('\t');
|
||||||
|
while ((i = read(fd, line, sizeof(line))) > 0)
|
||||||
|
(void) fwrite(line, 1, i, stdout);
|
||||||
|
}
|
||||||
(void) close(fd); /* unlocks as well */
|
(void) close(fd); /* unlocks as well */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user