Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 Jul 2008 08:32:00 +0200
From:      "=?ISO-8859-1?Q?Fernando_Apestegu=EDa?=" <fernando.apesteguia@gmail.com>
To:        EdwardKing <zhangsc@neusoft.com>
Cc:        FreeBSD <freebsd-questions@freebsd.org>
Subject:   Re: How to change process status?
Message-ID:  <1bd550a00807202332g69a71b66j8c985dc5f61e22e5@mail.gmail.com>
In-Reply-To: <00d501c8eafa$174daff0$3f83a8c0@neusofteaf5839>
References:  <00d501c8eafa$174daff0$3f83a8c0@neusofteaf5839>

next in thread | previous in thread | raw e-mail | index | archive | help
On 7/21/08, EdwardKing <zhangsc@neusoft.com> wrote:
> I make a process running in background,like follows:
> $./a.out &
>
> I want to know how to change a.out from backgound to foreground and how to stop it?

with "fg" and the number the shell returns after you placed the
process in the background. Let's say:

$./a.out &
[1] 27537

fg %1

-- Here the shell will bring the process to the foreground --

Now you can stop it with Ctrl-c for instance.


Cheers

>
> Thanks
>
>
> ----------------------------------------------------------------------------------------------
> Confidentiality Notice: The information contained in this e-mail and any accompanying attachment(s) is intended only for the use of the intended recipient and may be confidential and/or privileged of Neusoft Group Ltd., its subsidiaries and/or its affiliates. If any reader of this communication is not the intended recipient, unauthorized use, forwarding, printing, storing, disclosure or copying is strictly prohibited, and may be unlawful. If you have received this communication in error, please immediately notify the sender by return e-mail, and delete the original message and all copies from your system. Thank you.
> -----------------------------------------------------------------------------------------------
>
> _______________________________________________
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"
>



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