* 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?

I'm not sure that's the right behavior. If you call shutdown and it
didn't shutdown it should probably not be considered a success.

-- 
Eric Dorland <[EMAIL PROTECTED]>
ICQ: #61138586, Jabber: [EMAIL PROTECTED]

Attachment: signature.asc
Description: Digital signature

_______________________________________________
opensc-devel mailing list
[email protected]
http://www.opensc-project.org/mailman/listinfo/opensc-devel

Reply via email to