Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 Jul 2002 14:25:17 +0200
From:      Marc Recht <marc@informatik.uni-bremen.de>
To:        Vijay Patel <talkwithpatel@yahoo.com>
Cc:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: How to keep java code running after logout
Message-ID:  <20020730142517.047c9459.marc@informatik.uni-bremen.de>
In-Reply-To: <20020730061600.95733.qmail@web12201.mail.yahoo.com>
References:  <20020730061600.95733.qmail@web12201.mail.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
--H:qK1,F=.gK)c9+o
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit

> 	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.
IIRC this depends on the shell. But IMHO it is normal behaviour
that the child (your program) gets killed if the parent (the shell) 
got killed. You should read nohup(1). nohup is your friend. :-)
 
But for 24x7 you could also use init(8). Under SysV you could 
write your program in /etc/inittab and under *BSD in /etc/ttys.
So the program gets automatically started by init _and_ restarted
if it crashes.
--H:qK1,F=.gK)c9+o
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (FreeBSD)

iD8DBQE9RoW07YQCetAaG3MRAtqaAJ9f6PkofgGONNpzfh1RKxklIcFQtwCfeGB3
B+TtpUO8Ca4OFNnkTOFLgwI=
=dNqX
-----END PGP SIGNATURE-----

--H:qK1,F=.gK)c9+o--


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




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