From owner-freebsd-questions Wed Nov 24 9:15:20 1999 Delivered-To: freebsd-questions@freebsd.org Received: from scientia.demon.co.uk (scientia.demon.co.uk [212.228.14.13]) by hub.freebsd.org (Postfix) with ESMTP id 952721501B for ; Wed, 24 Nov 1999 09:14:11 -0800 (PST) (envelope-from ben@scientia.demon.co.uk) Received: from strontium.scientia.demon.co.uk ([192.168.0.4] ident=ben) by scientia.demon.co.uk with smtp (Exim 3.092 #1) id 11qful-0009Zl-00; Wed, 24 Nov 1999 17:09:07 +0000 Date: Wed, 24 Nov 1999 17:09:07 +0000 From: Ben Smithurst To: Peng HaiJie Cc: freebsd-questions@freebsd.org Subject: Re: Is a feature or a bug of nvi? Message-ID: <19991124170907.B926@strontium.scientia.demon.co.uk> References: <199911241204.MAA98904@cn.FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <199911241204.MAA98904@cn.FreeBSD.org> Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Peng HaiJie wrote: > /usr/bin/nvi will > :^\Quit - core-dumped > when I am in ex mode and press ^\ or ^$ in my home directory, > but it won't core-dumped if I am not in home directory(such as in /). > Is it a feature or a bug of nvi? Well, it's nothing to do with nvi. If you aren't in a directory you have write permission for, the kernel can't write a core file for you. Try it in /tmp, you should find it can dump core there. Try writing a simple program which just calls abort() - you will see it exhibits the same behaviour. === begin code #include int main(void) { abort(); exit(EXIT_FAILURE); } === end code ben@strontium:~/tmp$ ./a.out zsh: abort (core dumped) ./a.out ben@strontium:~/tmp$ cd / ben@strontium:/$ ~/tmp/a.out zsh: abort /home/ben/tmp/a.out -- Ben Smithurst | PGP: 0x99392F7D ben@scientia.demon.co.uk | key available from keyservers and | ben+pgp@scientia.demon.co.uk To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message