Click here to Skip to main content
15,887,477 members
Please Sign up or sign in to vote.
4.50/5 (2 votes)
See more:
Hi I run one mono service using this code

mono-service2 -l:service.lock --debug  /usr/local/lib/SampleService1.exe &
    FOO_PID=$!



and try to kill the process using same id but it not worked
kill  $FOO_PID


I also try this with terminal too but not worked. The terminal output like this
-bash: kill: (7522) - No such process
[1]+  Exit 1                  mono-service2 -l:service.lock --debug /usr/local/lib/SampleService1.exe



please help me.....
Posted

1 solution

Does this work?
kill -9 $FOO_PID
 
Share this answer
 
Comments
Arun Kumar K S 27-Jul-12 23:55pm    
[root@localhost ~]$ mono-service2 -l:service.lock --debug /usr/local/lib/SampleService1.exe &
[1] 1499
[root@localhost ~]$ kill -9 1499
bash: kill: (1499) - No such process
[1]+ Exit 1 mono-service2 -l:service.lock --debug /usr/local/lib/SampleService1.exe
[root@localhost ~]$
Arun Kumar K S 28-Jul-12 1:34am    
Thanks to your help I solved it

The problem is that
mono-service2 -l:service.lock --debug /usr/local/lib/SampleService1.exe
already running in my machine
when I kill that its worked..

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900