* svwaitup directory change problem
@ 2009-07-19 17:21 Earl Chew
0 siblings, 0 replies; only message in thread
From: Earl Chew @ 2009-07-19 17:21 UTC (permalink / raw)
To: supervision
Commands like svwaitup(8) sometimes work on the same directory
for several iterations.
If the service directories are relative (ie ./svc) rather than
absolute (ie /service/svc), then the subsequent iteration on the
same directory will fail.
Here is a simple patch for svwaitup(8). Others are similar.
--- svwaitup.c.orig 2009-07-19 10:18:12.000000000 -0700
+++ svwaitup.c 2009-07-19 10:18:33.000000000 -0700
@@ -63,8 +63,7 @@
dir =argv;
while (*dir) {
- if (dir != argv)
- if (fchdir(wdir) == -1) fatal("unable to switch to starting
directory");
+ if (fchdir(wdir) == -1) fatal("unable to switch to starting
directory");
if (chdir(*dir) == -1) {
warn(*dir, ": unable to change directory: ", &strerr_sys);
continue;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-07-19 17:21 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-19 17:21 svwaitup directory change problem Earl Chew
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).