Searching the Internet I found what appears to be full documentation on aconv at the following site:
https://libav.org/avconv.html
Looking at the docs, it appears that the tool is primarily used to convert video and audio data from one format to another. It primarily assumes that the input is a finite length stream and generates a corresponding resultant converted file. Since your video stream is continuous without obvious termination, it will simply "keep on going". I did notice that the tool has options such as "-t duration" which will terminate the conversion once the output is of a specified duration. That would be one way to terminate the result. What you didn't mention in your original post was how you wanted to stop recording? Is it a manual or automated "stop now" instruction or would a given duration be sufficient? If the later, it appears that the '-t' flag might do just that.
If you need a more generic solution, it appears that the tool called "motion" may be more to your liking. It appears to support external control via REST (HTTP) requests. This means that you can use cURL or similar web tools to send HTTP requests to the demon which will caused it to honor those commands ... for example ... to stop and start recording ... see:
http://www.lavrsen.dk/foswiki/bin/view/Motion/MotionHttpAPI