Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Lightweight processes

Status
Not open for further replies.

lawsoncs

Technical User
Oct 3, 2001
16
US
Hello,
I have a daemon with 6 lightweight processes, and I want to just kill lightweight process #3. Is there any form of UNIX commands that we can use to kill this specific lighweight process?? Thanks for your help!!
 
could you pls post the exit of:

ps -ef |grep process

did you try: kill -9 pid_of_process ??
 
Actually, saying THREAD instead of LWP would make more sense. I want to stop a thread (ID #3 when using ps -efL) of my process with a pid of 2236. Thanks!
 
but did you try kill -9 2236 ? or the pid in the moment..

with killall process you kill all of them, with kill -9 pid you kill only the pid.

Cheers.
 
When I use ps -efL, all my 9 threads have the same pid, but different thread (or LWP) id #'s. Not at work right now, but I'll post it when I get there later if you would like to see. Thanks.
 
Here you go:

UID PID PPID LWP NLWP CLS PRI STIME TTY LTIME COMD
slawson 9794 1 1 7 TS 70 13:32:43 pts/2 0:00 ./my_process
slawson 9794 1 2 7 TS 80 13:32:43 pts/2 0:00 ./my_process
slawson 9794 1 3 7 TS 80 13:32:43 pts/2 0:00 ./my_process
slawson 9794 1 4 7 TS 80 13:32:43 pts/2 0:00 ./my_process
slawson 9794 1 5 7 TS 58 13:32:43 pts/2 0:00 ./my_process
slawson 9794 1 6 7 TS 58 13:32:43 pts/2 0:00 ./my_process
slawson 9794 1 7 7 TS 58 13:32:43 pts/2 0:00 ./my_process

Notice the LWP numbers are different. I want to kill number 3.
 
I understand now.... I think that you can't do that, it must be done at application level. you can kill with UID, PID, but not LWP.

sorry.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top