| Summary: | Fix bugs in net/generic-nqs. Now it really works! | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Ports & Packages | Reporter: | shuhei <sa264> | ||||
| Component: | Individual Port(s) | Assignee: | freebsd-ports (Nobody) <ports> | ||||
| Status: | Closed FIXED | ||||||
| Severity: | Affects Only Me | CC: | tonym | ||||
| Priority: | Normal | ||||||
| Version: | Latest | ||||||
| Hardware: | Any | ||||||
| OS: | Any | ||||||
| Attachments: |
|
||||||
|
Description
shuhei
2001-10-10 22:40:01 UTC
[MAINTAINER RESPONSE] Sorry for the delay at looking at this. > files/patch-ab is empty so should be removed. Yes it should. > files/patch-ah fixes the bug which prevented NQS from sending emails. Looks ok to me. > files/patch-ai fixes the bug which caused removal of jobs from a pipe > queue when all the inbound-load-balanced queues that follow it are > busy. Looks correct to me but I do not have a network to test with at the moment. interconn is required on BSD systems (see patch-aa). Actually I'd suggest that this patch-ai be modified to do error checking as in patch-aa if (interconn () < 0) { fprintf (stderr, "%s(FATAL): Unable to get ", Nqsmgr_prefix); fprintf (stderr, "a pipe to the local daemon.\n"); exit (16); } > files/nqs.sh really kills the nqsdaemon. Looks good to me - it gets all the daemons and -KILL _is_ required. Please commit. thanks -- Tony Maher Systems Engineer email: tonym@biolateral.com.au BioLateral Pty Ltd. phone: +61 2 9980 8595 PO Box A51 Enfield South fax: +61 2 9642 5011 NSW Australia 2133 Thank you very much for reviewing the pr. > > files/patch-ai fixes the bug which caused removal of jobs from a pipe > > queue when all the inbound-load-balanced queues that follow it are > > busy. > > Looks correct to me but I do not have a network to test with at the moment. > interconn is required on BSD systems (see patch-aa). > Actually I'd suggest that this patch-ai be modified to do error checking > as in patch-aa > > if (interconn () < 0) { > fprintf (stderr, "%s(FATAL): Unable to get ", Nqsmgr_prefix); > fprintf (stderr, "a pipe to the local daemon.\n"); > exit (16); > } Looks good to me, although I haven't tested. My fix (without your error checking) has been working fine and you could trust me about that. The addition of the error checking shouldn't affect that. > Please commit. Please do. -- Shuhei On Thu, Nov 15, 2001 at 08:26:26AM +1100, Tony Maher wrote:
>
> Looks correct to me but I do not have a network to test with at the moment.
> interconn is required on BSD systems (see patch-aa).
> Actually I'd suggest that this patch-ai be modified to do error checking
> as in patch-aa
>
> if (interconn () < 0) {
> fprintf (stderr, "%s(FATAL): Unable to get ", Nqsmgr_prefix);
> fprintf (stderr, "a pipe to the local daemon.\n");
> exit (16);
> }
>
> Please commit.
Okay, if someone submits an updated patch to deal with the patch-aa
discussed above, I'll be happy to commit it.
Thanks,
Tom
At Thu, 15 Nov 2001 13:26:54 +0000,
Tom Hukins wrote:
>
> On Thu, Nov 15, 2001 at 08:26:26AM +1100, Tony Maher wrote:
> >
> > Looks correct to me but I do not have a network to test with at the moment.
> > interconn is required on BSD systems (see patch-aa).
> > Actually I'd suggest that this patch-ai be modified to do error checking
> > as in patch-aa
> >
> > if (interconn () < 0) {
> > fprintf (stderr, "%s(FATAL): Unable to get ", Nqsmgr_prefix);
> > fprintf (stderr, "a pipe to the local daemon.\n");
> > exit (16);
> > }
> >
> > Please commit.
>
> Okay, if someone submits an updated patch to deal with the patch-aa
> discussed above, I'll be happy to commit it.
>
> Thanks,
> Tom
Here's the patch (sorry, untested).
Thanks.
diff -uNr /usr/ports/net/generic-nqs/Makefile generic-nqs/Makefile
--- /usr/ports/net/generic-nqs/Makefile Wed Oct 10 21:56:06 2001
+++ generic-nqs/Makefile Wed Oct 10 22:32:36 2001
@@ -9,7 +9,7 @@
PORTNAME= Generic-NQS
PORTVERSION= 3.50.9
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= net
MASTER_SITES= ${MASTER_SITE_LOCAL}
MASTER_SITE_SUBDIR= fenner
diff -uNr /usr/ports/net/generic-nqs/files/nqs.sh generic-nqs/files/nqs.sh
--- /usr/ports/net/generic-nqs/files/nqs.sh Wed Jul 5 13:36:41 2000
+++ generic-nqs/files/nqs.sh Wed Oct 10 22:32:37 2001
@@ -8,7 +8,7 @@
fi
;;
stop)
- killall nqsdaemon && echo -n ' nqs'
+ killall -KILL nqsdaemon netdaemon loaddaemon && echo -n ' nqs'
;;
*)
echo "Usage: `basename $0` {start|stop}" >&2
diff -uNr /usr/ports/net/generic-nqs/files/patch-ah generic-nqs/files/patch-ah
--- /usr/ports/net/generic-nqs/files/patch-ah Thu Jan 1 01:00:00 1970
+++ generic-nqs/files/patch-ah Wed Oct 10 22:32:37 2001
@@ -0,0 +1,19 @@
+--- Source-Tree/nqsdaemon/all-systems/nqs_mai.c.orig Sun Mar 19 13:19:21 2000
++++ Source-Tree/nqsdaemon/all-systems/nqs_mai.c Sat Oct 6 10:21:00 2001
+@@ -247,8 +247,14 @@
+ argv [0] = "mail";
+ argv [1] = maildest;
+ argv [2] = (char *) 0;
+- execve ("/bin/mail", argv, /* Execve() mail program */
+- envp);
++ {
++ struct stat stb;
++ if (stat("/bin/mail", &stb) != -1)
++ execve ("/bin/mail",/* Execve() mail program */
++ argv, envp);
++ else if (stat("/usr/bin/mail", &stb) != -1)
++ execve ("/usr/bin/mail", argv, envp);
++ }
+ _exit (1);
+ }
+ else if (pid == -1) return (-1); /* Fork failed */
diff -uNr /usr/ports/net/generic-nqs/files/patch-ai generic-nqs/files/patch-ai
--- /usr/ports/net/generic-nqs/files/patch-ai Thu Jan 1 01:00:00 1970
+++ generic-nqs/files/patch-ai Thu Nov 15 14:17:46 2001
@@ -0,0 +1,17 @@
+--- Source-Tree/pipeclient/all-systems/pipeclient.c.orig Sun Mar 19 13:19:42 2000
++++ Source-Tree/pipeclient/all-systems/pipeclient.c Thu Nov 15 14:17:26 2001
+@@ -1059,7 +1059,14 @@
+ signal(SIGPIPE, catch_sigpipe);
+
+ do {
++#if HAS_BSD_PIPE
++ if (interconn () < 0) {
++ sal_dprintf(SAL_DEBUG_INFO, SAL_DEBUG_MSG_WARNING, "pipeclient: Unable to get a pipe to the local daemon.\n");
++ ourserexit (RCM_UNAFAILURE, (char *) 0);
++ }
++#else
+ interset(-1);
++#endif
+ interclear ();
+ interw32i (rawreq->orig_seqno);
+ interw32u (rawreq->orig_mid);
State Changed From-To: open->closed Committed - thanks! |