exit-code

Are javaws exit codes really broken?

…衆ロ難τιáo~ 提交于 2019-12-19 08:14:30
问题 I was working to automate same java code execution using JNLP and I was surprised to discover that jawaws did not gave me a valid return code. Original execution line was: javaws -wait http://example.com:666/missing.jnlp This did showed an ugly window with "Unable to launch application." message. As you can image I tried to make this not require a GUI and tried: javaws -wait -Xnosplash -import -silent http://example.com:666/missing.jnlp But even if this command fails, it will still return 0 ,

STS launch error - Java was started but returned exit code=13

ε祈祈猫儿з 提交于 2019-12-19 05:08:36
问题 So I installed STS a while back now onto my Windows 7 64-bit machine, every time I try run STS I get the attached Java exit code=13 error below. I don't have have Eclipse installed into my machine, I mention this because every time I have tried to Google this error code threads about the same issue happening on Eclipse come up. I have also tried checking if Java is installed on my machine which it is. Does anyone know how to resolve this? 回答1: First you need to check that you are using 64 bit

How to deal with negative numbers that returncode get from subprocess in Python?

蹲街弑〆低调 提交于 2019-12-19 04:21:30
问题 This piece of script in python: cmd = 'installer.exe --install ...' #this works fine, the ... just represent many arguments process = subprocess.Popen(cmd) process.wait() print(process.returncode) This code works fine in my opinion, the problem is the value of .returncode . The installer.exe is ok, did many test to this, and now i trying to create a script in python to automate a test for many days executing this installer.exe . The installer.exe return: - Success is 0; - Failure and errors

How to tell if any command in bash script failed (non-zero exit status)

回眸只為那壹抹淺笑 提交于 2019-12-18 14:49:33
问题 I want to know whether any commands in a bash script exited with a non-zero status. I want something similar to set -e functionality, except that I don't want it to exit when a command exits with a non-zero status. I want it to run the whole script, and then I want to know that either: a) all commands exited with exit status 0 -or- b) one or more commands exited with a non-zero status e.g., given the following: #!/bin/bash command1 # exits with status 1 command2 # exits with status 0 command3

Application is still running in memory after Application.Exit() is called

感情迁移 提交于 2019-12-18 13:25:42
问题 The application I am building is still running in memory (checked in Task Manager) after it is closed using Application.Exit() . Because of this when I am running it again after closing it as mentioned above, I am getting this error "Only one instance at a time". Can you please tell me how to completely close my application? 回答1: It seems that this is a Windows ap and you are calling System.Windows.Forms.Application.Exit() but there is a thread still running in the background. Have you tried

How can I check if a given directory is accessible?

风格不统一 提交于 2019-12-18 09:25:59
问题 I am currently writing a script that will list all specific files in a directory. What I need the script to do is to verify that the directory is accessible. I am currently using this bit of code: # variable used to get the file permissions of the given directory perm=$(stat -c %a "$dir_name") if [ "$perm" != "755" -o "$perm" != "777" ]; then echo ERROR: "Directory $dir_name cannot be accessed check permissions" echo USAGE: "ass2 <directory>" exit 3 fi This will work for checking if they have

Is it up to the programmer to deallocate on exit()?

我只是一个虾纸丫 提交于 2019-12-18 09:03:11
问题 I have a program and when I input wrong data from the keyboard it just exits with exit(1) . I was testing with Valgrind and while this happens there are no errors, but I can see that there are still reachable x bytes. So my question: Is it up to the programmer to free memory before hitting an exit() or is the OS going to take care of it? 回答1: It's a good idea (and in old enough versions of Windows, it was essential), but when a program exit() s on modern operating systems its entire address

exec Exit Code Meaning for 11

一世执手 提交于 2019-12-18 08:56:26
问题 I'm using the following code on a linux web server $error = exec('phantomjs table1.js', $op, $code); echo $code; // prints 11 on screen table1.js var page = require('webpage').create(); var url = 'table1.php'; page.open(url, function (status) { page.render('ss/table1.png'); phantom.exit(); }); table1.php echo '<h1>This should be converted to an image</h1>'; I went through this link but that code isn't listed there. Any idea what this exit code stands for? 回答1: Code 11 is a "segmentation fault

How to detect the status of msbuild from command line or C# Application

我与影子孤独终老i 提交于 2019-12-18 03:04:10
问题 I am writing up a checkout, build and deployment application in C#, and need to know the best way to detect whether my call to msbuild.exe has succeeded or not. I have tried to use the error code from the process, but I am not sure whether this is always accurate. Is there a way (through the code below) that I can tell whether msbuild.exe completed successfully? try { Process msbProcess = new Process(); msbProcess.StartInfo.FileName = this.MSBuildPath; msbProcess.StartInfo.Arguments =

How to detect the status of msbuild from command line or C# Application

冷暖自知 提交于 2019-12-18 03:04:08
问题 I am writing up a checkout, build and deployment application in C#, and need to know the best way to detect whether my call to msbuild.exe has succeeded or not. I have tried to use the error code from the process, but I am not sure whether this is always accurate. Is there a way (through the code below) that I can tell whether msbuild.exe completed successfully? try { Process msbProcess = new Process(); msbProcess.StartInfo.FileName = this.MSBuildPath; msbProcess.StartInfo.Arguments =