1
0

Compare commits

..

No commits in common. "f02d7770edab0d77922e21a40b3ba8f402522f1e" and "77c47160e84d5783ade5d58620473decf2bf0979" have entirely different histories.

6 changed files with 6 additions and 5 deletions

View File

@ -73,4 +73,4 @@ Copyright (C) 2024 DTB. License AGPLv3+: GNU AGPL version 3 or later
.SH SEE ALSO .SH SEE ALSO
cat(1p), dd(1), dj(1), tee(1p) cat(1), dd(1), dj(1), tee(1)

View File

@ -127,7 +127,7 @@ int main(int argc, char *argv[]){
} }
restore_echo(0); restore_echo(0);
if(outputs[2] /* -p */ != NULL){ if(outputs[2] /* -p */ != NULL){
fclose(outputs[2]); fclose(outputs[2]);
close(p[1]); close(p[1]);

View File

@ -21,10 +21,11 @@ int main(int argc, char *argv[]){
fprintf(stderr, "%s: %s: %s\n", argv[0], argv[1], fprintf(stderr, "%s: %s: %s\n", argv[0], argv[1],
strerror(errno)); strerror(errno));
switch(errno){ switch(errno){
case ENAMETOOLONG: return EX_OSERR;
case EACCES: return EX_NOPERM; case EACCES: return EX_NOPERM;
case ENOENT: case ENOTDIR: case ELOOP: return EX_UNAVAILABLE;
return EX_NOINPUT; case ENAMETOOLONG: return EX_OSERR;
case ENOENT: return EX_NOINPUT;
case ENOTDIR: return EX_NOINPUT;
default: return EX_UNAVAILABLE; default: return EX_UNAVAILABLE;
} }
} }