Correct the parent notification diagnostic emitted from the child

process in -background mode (it should report failure if appropriate).
This commit is contained in:
Brian Somers 2000-03-22 03:02:01 +00:00
parent 5a8b6a98df
commit 5a83ad1eb1
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=58457

View File

@ -165,7 +165,8 @@ bundle_Notify(struct bundle *bundle, char c)
{ {
if (bundle->notify.fd != -1) { if (bundle->notify.fd != -1) {
if (write(bundle->notify.fd, &c, 1) == 1) if (write(bundle->notify.fd, &c, 1) == 1)
log_Printf(LogPHASE, "Parent notified of success.\n"); log_Printf(LogPHASE, "Parent notified of %s\n",
c == EX_NORMAL ? "success" : "failure");
else else
log_Printf(LogPHASE, "Failed to notify parent of success.\n"); log_Printf(LogPHASE, "Failed to notify parent of success.\n");
close(bundle->notify.fd); close(bundle->notify.fd);