Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How can we run a process as a background process in Linux?

Status
Not open for further replies.

ykul

Newbie level 4
Joined
Oct 16, 2007
Messages
7
Helped
1
Reputation
2
Reaction score
0
Trophy points
1,281
Activity points
1,333
linux run process in background

How can we run a process as a background process in Linux? Like in UNiX, to run a process as a background process we complie n give command a.out&.
 

linux run program in background

You can try screen. Even if you logout the server, you can still get the process back later.
 

run program in background linux

screen is better but a bit complex.
"example_command&" works just as good as in your mentioned Unix.
 

linux start process in background

dint get it example_command&?????????? Wht to do with it. I write a program-a.c
main()
{
long i;
for(i=0;i<=400000;i++)
printf("l is %d\n",i);
}

How to run it as background process in Linux. In unix after compilation a.out file generate, and command a.out& ,where & will make it a background process, which is terminated only when the process ends or is interrupted with DEL.The unix prompt will come back on screen immediately. Load the editor again and wait. After sometime l is 400000 will b displayed at the top left corner of the screen.
Again my query is how to run it as background process in Linux??
 

linux running processes

Any command terminated with & will execute in the background. Of course this implies that your program doesn't require user intervention. This is shell related thing. So, what do you want to do? To compile a program in the background or something else?
 

how to run a process in background in linux

ykul said:
In unix after compilation a.out file generate, and .....

1. which one of unices do you mean ? hp-ux, aix, irix, solaris, bsd ... ?
2. which shell was it in your mentiioned unix ? bash, bourne sh, cshell, korn ... ?
 

how to run process in background in linux

I simply want to know the "command" or steps to run & compile a program as a background process in Linux.
 

linux run process background

ykul said:
dint get it example_command&?????????? Wht to do with it. I write a program-a.c
main()
{
long i;
for(i=0;i<=400000;i++)
printf("l is %d\n",i);
}
You have several ways, as reported by others.
If instead you don't wan't to have the output of your previously launched command you can redirect stdout to /dev/null:
Assuming you are in bash
# a.out > /dev/null &
#

at this point, when your program orint out the printf, this would be redirected to /dev/null, thus is not showed.
If you have some program that output also in stderr you can easily redirect both ( stdout and stderr ) to /dev/null in this way.

# a.out > /dev/null 2>& 1 &


HTH

Pigi
 

run process background linux

study
 

start process in background linux

Hi,

you can use like this

aplication file & in a Konsole

eg:

xpdf file.pdf &

hope this helps
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top