>> Our programmers have been creating java based applications that they >> start and stop using simple scripts. The start script call java to start >> the program; however the stop script issues a simple kill command >> against the PID.
Ugh. Wrong, wrong, wrong, unless they have set up their application to capture something like SIGSTOP and die gracefully. >> Our problem if User A start the program, only User A can kill it (except >> for root). We want anyone in the group level to be able to also issue >> the kill command (in the script). Is there a way to allow users in a >> group to kill each other's started processes. Sudo. It's not just for operators any more. >> Being new to the zLinux and Java worlds, is it standard to issue a 'kill >> -9 pid" to terminate a java program? Absolutely not. Kill -9 is NEVER supposed to be used to normally exit an application. It's "terminate with extreme prejudice". Not a normal exit. >> Is there a better way Have the application set up a signal handler for SIGTERM or SIGUSR2 that triggers a normal termination, or engineer a normal shutdown message into the application. >> and how does >> issuing a kill de-allocate memory and other issues? Indeterminate. Kill -9 ends the application immediately with no chance of cleanup. It could get lucky and do no harm, or you could wedge something important that will require a full reboot (stuck semaphores and shared memory regions getting locked are common side effects). Most modern Unixen try to clean up as best they can after a SIGKILL, but it's never good practice to rely on that. ---------------------------------------------------------------------- For LINUX-390 subscribe / signoff / archive access instructions, send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390