Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 30 May 2002 00:35:31 -0400
From:      Andrew J Caines <A.J.Caines@halplant.com>
To:        freebsd-questions@FreeBSD.ORG
Subject:   Re: Send process to background
Message-ID:  <20020530043531.GF32486@hal9000.halplant.com>
In-Reply-To: <20020530031558.GA1146@altair.mukappabeta.net>
References:  <011201c20768$d35d1040$6800a8c0@rafter> <Pine.BSF.4.05.10205291931470.8511-100000@buffnet11.buffnet.net> <20020530031558.GA1146@altair.mukappabeta.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Since no-one has stated it clearly yet...

It is the shell which provides job control, not the OS.

Shells common to many OSs including FreeBSD which have job control include
csh, ksh, bash, zsh and tcsh.

Since so-called Bourne shells ("sh") these days typically aren't (they're
usually ksh, bash, ash, etc. with behaviour modified by invocation), some
may have job control.

If you're running program "abc" from the command line of a shell with job
control, then you'll almost certainly use ^Z to suspend the program, ie.
send it a STOP signal and give you your shell prompt back, then type "bg"
to tell the shell to continue running it in the background, ie. send it a
CONT signal.

hostx# abc
^Z
[1]+  Stopped                 abc
hostx# bg
[1]+ abc &
hostx#
...
[1]+  Done                    abc

You can avoid this by running abc in the background from the start with
"&" at the end of the command, eg.

hostx# abc &
[1] 53911


If you're thinking of choosing a shell, remember that C type shells (csh,
tcsh, etc.) are for perverts and the insane. Use a Bourne-derived shell
such as bash, zsh, ksh or your native sh.

If you have to be different, take a look in /usr/ports/shells for es, rc,
perlsh and other fancy stuff.


-Andrew-
-- 
 _______________________________________________________________________
| -Andrew J. Caines-   Unix Systems Engineer   A.J.Caines@halplant.com  |
| "They that can give up essential liberty to obtain a little temporary |
|  safety deserve neither liberty nor safety" - Benjamin Franklin, 1759 |

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




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