From owner-freebsd-questions Tue Jul 30 8:33:30 2002 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 D249337B400 for ; Tue, 30 Jul 2002 08:33:25 -0700 (PDT) Received: from ei.bzerk.org (ei.xs4all.nl [213.84.67.5]) by mx1.FreeBSD.org (Postfix) with ESMTP id 98F4943E5E for ; Tue, 30 Jul 2002 08:33:24 -0700 (PDT) (envelope-from fbsd-q@bzerk.org) Received: from ei.bzerk.org (BOFH@localhost [127.0.0.1]) by ei.bzerk.org (8.12.5/8.12.5) with ESMTP id g6UFY8r6010734; Tue, 30 Jul 2002 17:34:12 +0200 (CEST) (envelope-from stable@ei.bzerk.org) Received: (from stable@localhost) by ei.bzerk.org (8.12.5/8.12.5/Submit) id g6UFY8lc010733; Tue, 30 Jul 2002 17:34:08 +0200 (CEST) Date: Tue, 30 Jul 2002 17:34:08 +0200 From: Ruben de Groot To: "Balaji, Pavan" Cc: "'Vijay Patel'" , freebsd-questions@FreeBSD.ORG Subject: Re: To keep running java code in background after logout Message-ID: <20020730173408.A10667@ei.bzerk.org> References: <3D386AED1B47D411A94300508B11F18704AD697F@fmsmsx116.fm.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <3D386AED1B47D411A94300508B11F18704AD697F@fmsmsx116.fm.intel.com>; from pavan.balaji@intel.com on Tue, Jul 30, 2002 at 07:45:48AM -0700 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 On Tue, Jul 30, 2002 at 07:45:48AM -0700, Balaji, Pavan typed: > > First of all I'm surprised that the code was still running in the background > in Linux after you logout. Probably, you mean, you close the terminal window > and not logout. No, this is a very annoying Linuxism, or rather, bash'ism. For some reason the people who coded that shell didn't appreciate the subtle difference between a background job and the nohup mechanism. > > Anyway, try using "nohup "... It might help.. > > > Pavan Balaji, > Intel Corporation > Email: pavan.balaji@intel.com > > "Only the Paranoid Survive" -- Andy Grove > > > > -----Original Message----- > > From: Vijay Patel [mailto:talkwithpatel@yahoo.com] > > Sent: Tuesday, July 30, 2002 1:10 AM > > To: freebsd-questions@FreeBSD.ORG > > Subject: To keep running java code in background after logout > > > > > > > > Hi friends, > > I have installed FreeBSD 4.5 on my machine. I am also > > having 2 other machines running on linux. > > We have developed a code in java which we need to run > > in background for 24 hrs. In linux we use... > > java Code1 & > > > > command to run our code in background. After starting > > this command we just logout from that terminal window. > > We have seen that on linux machine our code works fine > > in background. > > > > When i have tested same code on our FreeBSD server, > > unfortunately it gets killed, without writting any > > error message in log file. We tried to search on all > > help pages available about how to run our application > > in background - on console window. We did not get any > > help about this item. > > > > My observations are... when i start code on FreeBSD, > > then i issue ps command ... > > > > bash-2.05a$ ps > > PID TT STAT TIME COMMAND > > 1006 p0 Ss 0:00.04 -bash (bash) > > 1087 p0 S 0:00.20 > > /usr/local/jdk1.3.1/bin/i386/green_threads/java Code1 > > 1103 p0 R+ 0:00.00 ps > > > > > > After starting my code, i logout & relogin to check > > whether my code is working in background or not.... > > > > bash-2.05a$ ps > > PID TT STAT TIME COMMAND > > 1087 p0- I 0:00.20 > > /usr/local/jdk1.3.1/bin/i386/green_threads/java Code1 > > 1105 p0 Ss 0:00.01 -bash (bash) > > 1106 p0 R+ 0:00.00 ps > > > > It is showing that code is working right now. But > > after 2-3 hours code automatically gets killed. I am > > having good provision for keeping all error log iff my > > code exists with an error. But here i am sure that it > > is getting killed - so i am not getting any error log. > > > > Can any friend help in how to keep my code working > > without a terminal window. - I am starting my code > > using ssh terminal from another machine. It is not > > possible for me to go to front of server & start code > > from server itself. Is there any idea how all deamon > > processes works - Tomcat, Mysqld etc... > > > > Thanks in advance. > > > > __________________________________________________ > > Do You Yahoo!? > > Yahoo! Health - Feel better, live better > > http://health.yahoo.com > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > > with "unsubscribe freebsd-questions" in the body of the message > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message