Computing.Net > Forums > Unix > how to start a process

how to start a process

Reply to Message Icon

Original Message
Name: pepe
Date: January 27, 2000 at 09:30:04 Pacific
Subject: how to start a process
Comment:

could someone please help me with this:

I need to start process ‘proces1’ in the background with parameters ‘-c go –l’. Then start process ‘proces2’, stop it, restart it in the background


Report Offensive Message For Removal


Response Number 1
Name: James
Date: January 29, 2000 at 09:42:55 Pacific
Subject: how to start a process
Reply: (edit)

I am not sure exactly what you are talking about but csh intoduced(and was adopted by other sh) & for a background process. try # sleep 10 & and then ps. You see the process ID of sleep? If you want to kill it just # kill "$pid" where $pid is the process ID. If you want a short cut there is a system variable $! that contains the pid of the last process put into the background by &. So if sleep 10 & was your last background process # kill $! will end it.


Report Offensive Follow Up For Removal

Response Number 2
Name: modulus
Date: January 31, 2000 at 21:28:44 Pacific
Subject: how to start a process
Reply: (edit)

Assuming you want to launch a process called `myproc' with a couple of args into the background.
the command would be:
myproc -t arg &
Notice that the `&' is not a typo. To kill the process simply use:
ps aux | grep "myproc" (to get the process id) then use the kill command.


Report Offensive Follow Up For Removal







Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: how to start a process

Comments:

 


  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 
Data Recovery Software