exit-code

Matlab returns exit code immediately

狂风中的少年 提交于 2019-12-12 12:13:20
问题 I am creating various matlab .m-files with python and then run them using subprocess. When the files are finished I would like to delete them: command = ['C:\\MatlabR2012b\\bin\\matlab.exe', '-nodesktop', '-nosplash', '-r', 'mfile'] matlab = subprocess.Popen(command) # launch matlab with m file matlab.wait() # wait for matlab to finish before deleting .m file print "delete" os.remove(self.filename) The problem is that matlab.wait() never waits, since matlab returns exit code 0 immediately. Is

Pyside applications not closing properly

拥有回忆 提交于 2019-12-12 09:52:58
问题 I recently took up GUI programming in PySide and I'm having trouble with an oddity regarding exit commands. Sys.exit([x]) seems to be widely used to stop a PySide program; whenever I use it in a PySide program using classes, however, it doesn't return an exit code to PyCharm or stop the Python process in the task manager. Oddly enough it seems it's incredibly hard to do either of these things when using PySide; I could break out of the main loop, call sys.exit(0) , raise SystemExit(0) and it

Bash: One-liner to exit with the opposite status of a grep command?

断了今生、忘了曾经 提交于 2019-12-12 09:28:40
问题 How can I reduce the following bash script? grep -P "STATUS: (?!Perfect)" recess.txt && exit 1 exit 0 It seems like I should be able to do it with a single command, but I have a total of 3 here. My program should: Read recess.txt Exit 1 (or non-zero) if it contains a line with "STATUS: " of NOT "Perfect" Exit 0 if no such line exists (i.e. all "STATUS: " lines are "Perfect") The answer award goes to the tightest script. Thanks! Example files Program should have exit status 0 for this file:

java was started but returned exit code

核能气质少年 提交于 2019-12-12 07:59:43
问题 when i was starting eclipse, i first got this error dialog: After this error,i researched and found a solution here. this solution asked me to give this line in eclipse.ini: -vm C:\Program Files (x86)\Java\jdk1.7.0_25\bin\javaw.exe but after adding this, i found another kind of error dialog: after this error,i researched alot, and found these solutions sol1 ,sol2 after following these, error is not resolved. does anyone know why i am facing this problem. note: i know this is kind of duplicate

What are the error exit values for diff?

时光毁灭记忆、已成空白 提交于 2019-12-12 07:12:50
问题 On the diff man-page I've found these exit values: 0 No differences were found. 1 Differences were found. >1 An error occurred. Are there different exit values above 1 for different errors? 回答1: It depends on your diff command. Mine (GNU diffutils 3.0) says: An exit status of 0 means no differences were found, 1 means some differences were found, and 2 means trouble. Normally, differing binary files count as trouble, but this can be altered by using the -a or --text option, or the -q or -

How to return exit status and output of system commands in Racket?

匆匆过客 提交于 2019-12-12 04:35:38
问题 I'd like to not only capture the output of a command like with (with-output-to-string (lambda () (system "ls -la"))) But also would like to be able to access the exit code, so that I do not have to parse the output to know whether the command was successful or not and can react on it accordingly. How do I do this in Racket? I found the documentation about subprocess, but I don't know how to provide all the arguments like standard out. I'd like to see some comprehensive example, in which the

Qt creating new translation (ts) using Visual gives error - (ExitCode 1)

岁酱吖の 提交于 2019-12-11 06:56:08
问题 I am using QTranslator in VS 2010. When using the process below I get an error saying the add-on has exited with an error (Exitcode 1). I have been through the whole process (code to executable with translations working) using Qt Linguist and Qt Creator. However, I cannot even create the ts file in Visual Studio (add on menus all where they should be). Anyone any ideas why please? Creating Qt Translation Files for the Project To add a new translation file to the project, select Qt|Create New

Bash like PIPESTATUS equivalent for perl [duplicate]

我的未来我决定 提交于 2019-12-11 06:52:33
问题 This question already has answers here : How can I check the status of the first program in pipeline in Perl's system()? (7 answers) Closed 4 years ago . My goal is to capture the exit code of external command issued from perl. The trick is that the external command is actually composed of two commands where first command is piped to second command. For my purposes I need exit code of first command. Bash uses for this purpose several possible ways e.g. $ false | true; echo "${PIPESTATUS[0]}"

Get exit code of a piped background process

自古美人都是妖i 提交于 2019-12-11 05:01:27
问题 someCommand 2>&1 | grep pattern & How do I get the exit status of someCommand ? PIPESTATUS doesn't work because it's a background process. I've found this link and it seems to work but only if I use it exactly that way. Simple echo ing to the screen doesn't seem to work. I was wondering if it's possible to get the exit code without creating temporary files. 回答1: In bash you could do : echo "${PIPESTATUS[0]} ${PIPESTATUS[1]}" Example : $ ls -l | grep somefile -rw-rw-r-- 1 me me 32 May 4 15:47

What is the meaning of exit code 3 from Rez?

有些话、适合烂在心里 提交于 2019-12-11 04:39:18
问题 An XCode project on OSX 10.6 fails building due to exit code 3 when trying to run Rez. What does this mean? I'm sure the files exist and all paths are set correctly, and have valid content. Google and AltaVista turn up nothing but others with the same question. More generally, since I have a talent for creating errors on OSX, is there a list of all possible exit codes for Rez and what they mean? Are these standard among all of Apples command line programs? UPDATE: Here's the first .r file