Why am I seeing multiple “The thread 0x22c8 has exited with code 259 (0x103).” messages

From MSDN Documentation: Remarks This function returns immediately. If the specified thread has not terminated and the function succeeds, the status returned is STILL_ACTIVE. If the thread has terminated and the function succeeds, the status returned is one of the following values: The exit value specified in the ExitThread or TerminateThread function. The return value … Read more

Command /usr/bin/codesign failed with exit code 1

I had the exact same error, and tried everything under the sun, including what was suggested elsewhere on this page. What the problem was for me was that in Keychain Access, the actual Apple WWDR certificate was marked as “Always Trust”. It needed to be “System Defaults”. That goes for your Development and Distribution certificates, … Read more

How to trap exit code in Bash script

The accepted answer is basically correct, I just want to clarify things. The following example works well: #!/bin/bash cleanup() { rv=$? rm -rf “$tmpdir” exit $rv } tmpdir=”$(mktemp)” trap “cleanup” EXIT # Do things… But you have to be more careful if doing cleanup inline, without a function. For example this won’t work: trap “rv=$?; … Read more

Why are my PowerShell exit codes always “0”?

This is a known issue with PowerShell. Executing a script with -file returns an exit code of 0 when it shouldn’t. (Update: The links below no longer work. Please look for, or report, this problem on PowerShell: Hot (1454 ideas) – Windows Server) https://connect.microsoft.com/PowerShell/feedback/details/777375/powershell-exe-does-not-set-an-exit-code-when-file-is-used https://connect.microsoft.com/PowerShell/feedback/details/750653/powershell-exe-doesn-t-return-correct-exit-codes-when-using-the-file-option Since using -command wasn’t working for you, you could try … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)