[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avrdude-dev] Cleanup after ^C
From: |
Michal Ludvig |
Subject: |
Re: [avrdude-dev] Cleanup after ^C |
Date: |
Sun, 10 Jan 2010 23:25:19 +1300 |
User-agent: |
Thunderbird 2.0.0.23 (X11/20090817) |
Joerg Wunsch wrote:
> As Michal Ludvig wrote:
>
>> one outstanding problem with the BusPirate programmer that should be
>> addressed before the next release is the behaviour when avrdude gets
>> killed (for instance with Ctrl-C) during programming. That leaves
>> the BusPirate in a non-default mode that isn't very easy to get out
>> from.
>
> I've got my doubts we'll be able to fix that before the next
> release...
One thing is reseting BusPirate during unclean exit (that may not be
cleanly doable) and another thing is detecting that BP is in a
non-default state and resetting it upon next avrdude run. At least that
should be implemented so that people can run avrdude, Ctrl-C it and run
avrdude again without power-bouncing the BusPirate (as it doesn't have a
reset button :-/ )
What's your deadline for the next release by the way?
> . There are still many functions in libavrdude that directly call
> exit(1). They should not do that. Instead, they should propagate
> their failure through a return code, and leave it up to the caller
> to handle it. The only file that should ever call exit(1) is
> main.c.
You can register a cleanup function with atexit() to ensure it's called
after any exit(). However that doesn't kick in for exits triggered by
signals.
Michal
Re: [avrdude-dev] Cleanup after ^C, Joerg Wunsch, 2010/01/10