Date: Sun, 30 Aug 2015 11:55:24 +0200 From: Fabian Keil <freebsd-listen@fabiankeil.de> To: zhup <zhup@tutamail.com> Cc: freebsd-questions@freebsd.org Subject: Re: How to make process working in background? Message-ID: <2ac65a7c.445eda7a@fabiankeil.de> In-Reply-To: <1440834990532-6035821.post@n5.nabble.com> References: <1440834990532-6035821.post@n5.nabble.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--Sig_/h2CM1Lhs3lY98BY+7D5jXqF Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable zhup <zhup@tutamail.com> wrote: > I have below startup script. > My question is how to make this process working in background? >=20 > #!/bin/sh > . /etc/rc.subr > name=3Dtest > rcvar=3Dtest_enable > command=3D"/usr/sbin/${name}" > load_rc_config $name > run_rc_command "$1" If the program itself has no flag to go into the background you can use daemon(8) for this: https://www.freebsd.org/cgi/man.cgi?query=3Ddaemon > Why I am not able to stop this process? >=20 > root@mys:~ # /etc/rc.d/test stop > Stopping test. > Waiting for PIDS: 5146 5147Stopping oscam. > Waiting for PIDS: 5146 5147 Did you verify that the PIDs are correct? Specifying a pidfile may help. Fabian --Sig_/h2CM1Lhs3lY98BY+7D5jXqF Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAlXi0wkACgkQBYqIVf93VJ2g4wCgsK576RXGmHNrp37znvvYz+sF OtIAoIbbUe4CrazkQKUmSnoV0IZ7J/rp =JHPJ -----END PGP SIGNATURE----- --Sig_/h2CM1Lhs3lY98BY+7D5jXqF--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2ac65a7c.445eda7a>