- if ((hook = context_find("msg-hook")) != (char *)0)
- advise(NULL, hook);
- else
- advise(NULL, "external hook (%s) did not work properly.", hook);
-
+ char *msghook;
+ if ((msghook = context_find("msg-hook")) != NULL)
+ inform(msghook);
+ else {
+ char errbuf[BUFSIZ];
+ snprintf(errbuf, sizeof(errbuf), "external hook \"%s\"", hook);
+ pidstatus(status, stderr, errbuf);
+ }