[prev in list] [next in list] [prev in thread] [next in thread]
List: freebsd-hackers
Subject: Re: [CALL FOR TESTERS] New system call: abort2()
From: "Wojciech A. Koszek" <dunstan () freebsd ! czest ! pl>
Date: 2005-12-23 0:42:48
Message-ID: 20051223004248.GA19050 () FreeBSD ! czest ! pl
[Download RAW message or body]
On Fri, Dec 16, 2005 at 11:14:12AM -0500, John Baldwin wrote:
> On Friday 16 December 2005 04:10 am, Peter Jeremy wrote:
> > On Thu, 2005-Dec-15 22:37:45 +0000, Wojciech A. Koszek wrote:
> > > abort2(const char *why, int nargs, void **args);
> > >
> > >"why" is reason of program abort, "nargs" is number of arguments
> > >passed in "args". Both "why" and "args" (with "%p" format) will be
> > >printed via log(9). Sample output:
> > >[..]
> > >pid <3004> <abort2> abort2: ABORT2 <arg0:0x62612f2e>
> > >pid <3019> <abort2> abort2: invalid argument
> > >[..]
[..]
>
> Agreed. Also, copyinstr() can provide a better interface for copying the why
> string in. Also, the PROC LOCK isn't needed for reading the static p_pid and
> p_comm fields of struct proc. Also, I second the other comments of do { }
> while(0) vs goto. Many existing syscalls use 'goto out;' for error handling,
> and I think that is one of the very few cases when goto is useful and not
> harmful.
Updated patch is here:
http://freebsd.czest.pl/dunstan/FreeBSD/abort2/abort2.3.patch
If I have to change something, let me know. Once again -- comments are
welcome.
--
* Wojciech A. Koszek && dunstan@FreeBSD.czest.pl
_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic