read_cmdline should close files -- thanks Jim

This commit is contained in:
albert 2002-12-28 09:37:42 +00:00
parent 1f3181bcbf
commit 33a8de391e

View File

@ -318,6 +318,7 @@ int read_cmdline(char *restrict const dst, unsigned sz, unsigned pid){
if(n==sz) break; // filled the buffer
if(r==0) break; // EOF
}
close(fd);
if(n){
int i;
if(n==sz) n--;