Hot answers tagged

19

The exit status of a killed command should be the signal number plus 128. So you can use the exit status to find out which signal killed you process. I tested it like this on Linux in the shell: print_exit_status_for_signal () { ( sleep 1000 echo Exit staus $? = signal $(( $? - 128 )) ) & sleep 1 killall "${1:+-$1}" sleep } ...


2

Several ways to do that. You can simply use dd, like : dd if=/dev/zero of=/dev/null Or there are other tools like stress : stress --cpu 2 --timeout 60 The above will stress two cores for 60 seconds. Or you can also use an endless while loop : while true; do true; done Another possibility is this fork bomb - careful with this as it might even ...


1

Short of upgrading your Mint installation, the easiest way to upgrade to Java 8 is as you found out to install Oracle's JDK. The correct way to do this though is to use java-package. Start by downloading the appropriate JDK from Oracle, then sudo apt-get install java-package make-jpkg jdk-8u92-linux-x64.tar.gz sudo dpkg -i oracle-java8-jdk_8u92_amd64.deb ...


1

nohup is a command which makes another command safe from hup signals. Assuming you already know how it behaves, you can run java file as: nohup ${JAVA_HOME}/bin/java YourClass & Or nohup ${JAVA_HOME}/bin/java -cp ${CLASSPATH} YourClass & In case of jar nohup ${JAVA_HOME}/bin/java -jar Yourjar.jar & Note: The last & sign is not the ...


1

I would like to believe that it is not installed if so why the system returned java: /usr/bin/java? whereis doesn't resolve the symlink. So if /usr/bin/java still exist, even though the symlink target is broken, it will still return java: /usr/bin/java. I recommend you use type -a java to get the correct result. Please note that the symlink target OR ...


1

You may have to configure Alternatives to point to java, its explained in my link. I have noticed with trying to keep Oracle Java installed over the openjdk that you have to make sure everything is linking correct and running the correct version of java. If using an RPM system machine, I used the steps in the link below for getting it to work. Install ...



Only top voted, non community-wiki answers of a minimum length are eligible