From owner-freebsd-questions Mon Jan 20 9:31:38 2003 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4771037B401 for ; Mon, 20 Jan 2003 09:31:37 -0800 (PST) Received: from jive.SoftHome.net (jive.SoftHome.net [66.54.152.27]) by mx1.FreeBSD.org (Postfix) with SMTP id 6ADBE43F18 for ; Mon, 20 Jan 2003 09:31:36 -0800 (PST) (envelope-from lattera@softhome.net) Received: (qmail 32395 invoked by uid 417); 20 Jan 2003 17:31:30 -0000 Received: from slide-.softhome.net (HELO softhome.net) (172.16.2.21) by shunt-smtp-out-0 with SMTP; 20 Jan 2003 17:31:30 -0000 Received: from localhost (localhost [127.0.0.1]) (uid 417) by softhome.net with local; Mon, 20 Jan 2003 10:31:30 -0700 From: lattera@softhome.net To: freebsd-questions@freebsd.org Subject: too many kill()'s Date: Mon, 20 Jan 2003 10:31:30 -0700 Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Sender: lattera@softhome.net X-Originating-IP: [216.190.10.90] Message-ID: Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG The following source code: #include #include #include #include #include #include extern int errno; int main(int argc, char *argv[]) { signal(SIGINT, SIG_IGN); signal(SIGTERM, SIG_IGN); if (!fork()) { while(1) { kill(getppid(), SIGTERM); } } } // End of source when compiled and ran, makes my 4.7-release box quit EVERY SINGLE PROGRAM (including boot-time daemons), and go into a fix-it shell. My question is this: why does this happen? I can't seem to figure it out. I've worked with many other people about this, and they don't seem to know. (When you exit the fix-it shell, the computer finishes booting, it's like going into single-user mode upon boot) Run this code and see what happens (nothing bad, just wierd). bash-2.05b# uname -a FreeBSD 4.7-RELEASE FreeBSD 4.7-RELEASE #1: Sun Jan 19 17:46:33 MST 2003 shawn@:/usr/obj/usr/src/sys/FIREWALLED i386 bash-2.05b# Thanks, lattera To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message