Skip to content
/ JNA Public

How to kill all the progresses that have been started by the same program or its offspring? How to load binary libs such as .so, .jnilibs, .dll? How to set PGID and SID? How to acess to libs in the JAR?

Notifications You must be signed in to change notification settings

PatricYan/JNA

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 

Repository files navigation

JNA/JNI

When we need to call the c/c program, it is JNA/JNI that we need to complete.

Kill the progresses of the same PGID

You can kill the progresses, parent, children and grandchildren which are of the same PGID

PGID=`ps j -A | grep 'xxxxx' | grep -v 'grep' | awk '{print  $3}'`
# safety kill application which could hook the sign to deal something
kill -SIGTERM -- -${PGID}

# just kill all the progresses
kill -9 -${pid}
  • set the progress PGID and SID
  • you can load the JNA/JNI from the jar, and don't need to set it in the classpath

About

How to kill all the progresses that have been started by the same program or its offspring? How to load binary libs such as .so, .jnilibs, .dll? How to set PGID and SID? How to acess to libs in the JAR?

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published