Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 Mar 2001 16:10:03 -0800 (PST)
From:      Seth Kingsley <sethk@osd.bsdi.com>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: bin/24654: /usr/bin/w doesn't close all files
Message-ID:  <200103150010.f2F0A3h96332@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/24654; it has been noted by GNATS.

From: Seth Kingsley <sethk@osd.bsdi.com>
To: freebsd-gnats-submit@FreeBSD.org, zartik@yahoo.com
Cc:  
Subject: Re: bin/24654: /usr/bin/w doesn't close all files
Date: Wed, 14 Mar 2001 16:00:39 -0800

 While all kvm_close() does currently is close() descriptors and free
 dynamic memory, it does seem like the right thing to always call it.
 
 Index: w.c
 ===================================================================
 RCS file: /ncvs/src/usr.bin/w/w.c,v
 retrieving revision 1.38
 diff -u -r1.38 w.c
 --- w.c	1999/11/17 15:28:45	1.38
 +++ w.c	2001/03/14 22:26:06
 @@ -407,6 +407,7 @@
  		longidle = pr_idle(ep->idle);
  		(void)printf("%.*s\n", argwidth - longidle, ep->args);
  	}
 +	(void)kvm_close(kd);
  	exit(0);
  }
  
 -- 
 || Seth Kingsley || BSDi/Open Source Division || sethk@osd.bsdi.com ||

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200103150010.f2F0A3h96332>