"let the command fail" -> I meant ignore... :) Yes, I agree that this solution is the best one.
On 8/11/08, Ludovic Rousseau <[EMAIL PROTECTED]> wrote: > On Mon, Aug 11, 2008 at 2:14 PM, Alon Bar-Lev <[EMAIL PROTECTED]> wrote: > > Thanks! > > Do whatever you think right, but I don't think that searching for a > > specific file is correct, just let the command fail. > > > Letting the command fail will also make the caller fail. > > For example when you upgrade a Debian system you do not expect the > upgrade to fail because stopping a non-running openct failed. > > > Maybe a better solution is to NOT return an error code in case > "$DAEMON shutdown" fails because no status file is found. > Than patch is simple: > Index: src/tools/openct-control.c > =================================================================== > --- src/tools/openct-control.c (révision 1073) > +++ src/tools/openct-control.c (copie de travail) > @@ -148,7 +148,7 @@ static int mgr_shutdown(int argc, char * > if ((num = ct_status(&status)) < 0) { > fprintf(stderr, > "cannot access status file; no readers killed\n"); > - return 1; > + return 0; > } > > while (num--) { > > > Is that acceptable for everybody? > > Bye > > > -- > Dr. Ludovic Rousseau > _______________________________________________ opensc-devel mailing list opensc-devel@lists.opensc-project.org http://www.opensc-project.org/mailman/listinfo/opensc-devel