开发者

can i kill specific thred of a process at command line in linux using any command?

i want to ki开发者_Go百科ll specific thread of a process at command line..is there some command to achieve this?


there is an api for this, on linux:

int tkill(int tid, int sig);

refers to man page tkill(2)


I don't think you can do this. Most programs are not designed to handle one of their threads being shut down without their knowledge. The program might have passed important data off to that thread, or might be waiting for it to finish.

If it is truly a concern, you can attempt to find a single-threaded or multi-process version of the program. For example, Apache has both a prefork (non-threaded) and worker (threaded) version.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜