Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Significance of launchd exit codes?

I have a daily job (rsnapshot) that runs via launchd scheduling and appears to execute correctly but the log says it exited with errors. The rsnapshot backup looks fine. In addition, the system.log contains the following launchd (error?) message:

Exited with exit code: 2

What does this mean? Is it an error? Is there a reference list of launchd exit codes?

XServe, Mac OS X (10.5.5)

Posted on Nov 25, 2008 1:39 PM

Reply
5 replies

Nov 25, 2008 2:03 PM in response to jffh

Did you configure your rsnapshot */etc/rsnapshot.conf* with a

logfile /var/log/rsnapshot

or similar entry so that you get a log file from rsnapshot?

If you did, then go look at your log and see if rsnapshot completed without errors, or if it had an entry such as:

...completed, but with some errors

Looking at the rsnapshot code, I see the following:

} elsif (2 == $exit_code) {
syslog_warn("$run_string: completed, but with some warnings");
log_warn ("$run_string: completed, but with some warnings", 2);
exit ($exit_code);

which would say your rsnapshot completed with some warnings.

Again, go check your rsnapshot logs, and if you do not have logs, then set them up and the next time rsnapshot runs, go check the logs.

Dec 1, 2008 5:21 AM in response to BobHarris

With the rsnapshot logfile configured, I found a modest number of warnings like these:


WARNING: Could not lchown() symlink "/path/to/some/file"


So it appears that there is an attempt by rsnapshot to change the owner / group of these symbolic links. For the most part, they don't seem to be too important, but these would be my only concern:


WARNING: Could not lchown() symlink "/path/to/etc/localtime"
WARNING: Could not lchown() symlink "/path/to/etc/resolv.conf"
WARNING: Could not lchown() symlink "/path/to/etc/squirrelmail/plugins"
WARNING: Could not lchown() symlink "/path/to/lib/libdb-4.dylib"
WARNING: Could not lchown() symlink "/path/to/lib/libdb.dylib"
WARNING: Could not lchown() symlink "/path/to/lib/libMrm.4.dylib"
WARNING: Could not lchown() symlink "/path/to/lib/libMrm.dylib"
WARNING: Could not lchown() symlink "/path/to/lib/libUil.4.dylib"
WARNING: Could not lchown() symlink "/path/to/lib/libUil.dylib"
WARNING: Could not lchown() symlink "/path/to/lib/libXm.4.dylib"
WARNING: Could not lchown() symlink "/path/to/lib/libXm.dylib"


I looked at this directory and it has not been modified for 10 months. A little history is in order: we moved out entire infrastructure from NetBSD to Apple and /lib seems to be a carryover from the older system. Please advise if I am missing something. These error messages appear to be benign.

Dec 1, 2008 6:13 AM in response to jffh

Well I have them in my rsnapshot log as well.

So either Perl's lchown() implementation is flawed
on Mac OS X, or maybe we were not running as root,
or there is some protection issue with the volume we
are saving the file on.

Generally speaking this should not be an issue, but
they are your files and only you can answer whether
this is a problem for you.

Significance of launchd exit codes?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.