l i n u x - u s e r s - g r o u p - o f - d a v i s
Next Meeting:
July 7: Social gathering
Next Installfest:
Latest News:
Jun. 14: June LUGOD meeting cancelled
Page last updated:
2003 Aug 07 01:37

The following is an archive of a post made to our 'vox-tech mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
Re: [vox-tech] removing kill messages
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vox-tech] removing kill messages

On Tue, Aug 05, 2003 at 07:28:05PM -0700, Mark K. Kim wrote:
> hi guys.  so when i launch an app in the background and i kill it like
> this:
>    $kill $pid
>    $
> then it displays something like:
>    $
>    [1]+  Terminated              xv
> but if i'm doing this in a script, i want the display to not appear at
> all.  how do i stop this message from displaying?  thanks in adv!

This message is only displayed for a "job" of the shell's. And it's
only displayed when bash gets ready to display a shell prompt. I may
be wrong, but I don't think it gets displayed in noninteractive shells
(such as one used to run a script). But it *definitely* won't display
for a "disown"ed process which is no longer considered a "job".

"disown" is a bash builtin which disassociates a job from the current
shell. I use it (indirectly) quite a lot: I frequently find it
convenient to launch GUI apps from the command-line; however, I don't
like 'em cluttering up the job list, as my customized bash prompt
lists current jobs and their job numbers. For instance, my current
prompt (after suspending mutt) looks like:


(If you can't read the above, or it just looks like inverted text, try
piping this mail through "less -r" or something).

Or, for those whose mail-readers won't allow the interpretation of the
ANSI codes above:


Where the different underscoring characters denote distinguishing
colors (on the FreeBSD machine I'm shelled into at the moment, that's
green, red, and bold-yellow, respectively). I find this handy to keep
various console-oriented programs suspended and switch between them;
but I don't like having my background processes showing up there. So I
use a small script named "spawn" which simply launches the command in
the background and disowns it (I think it uses nohup, too - can't

disown is a builtin, though, so only available for bash, though other
programs may also have a disown command or similar. Also, disown
hasn't always been around, and may not be available in older versions
of bash.

vox-tech mailing list

LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
EDGE Tech Corp.
For donating some give-aways for our meetings.