On Tue, Aug 12, 2008 at 8:59 AM, Eric Dorland <[EMAIL PROTECTED]> wrote:
> * Ludovic Rousseau ([EMAIL PROTECTED]) wrote:
>> 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.
It didn't shutdown because it was not already running.
Checking for the presence of the status file in the init-script or in
the openct-control binary should be equivalent. In both cases you do
nothing and return success if the status file is not found.
The openct-control binary may return with an error code in other cases.
Bye
--
Dr. Ludovic Rousseau
_______________________________________________
opensc-devel mailing list
[email protected]
http://www.opensc-project.org/mailman/listinfo/opensc-devel