I thought I had talked about this before. But I cover so many subjects that there are times I just don't know. So thank you for calling me out on it.
My friend TexasWren sent me some books a few years ago books she used when she was homesteading. And that's how I found out about canning dried goods. It extends the shelf life of them and kills of any possible bug invasion.
Flour,oatmeal,corn meal, etc., but not sugar, can be "canned" in the oven. Heat your oven to 250F, place your dry goods in a canning jar, finger tight lids, place on a cookie sheet and heat for 1 hour. This will kill the bugs (if any). Turn oven off and allow to cool completely before removing.
If you want to can sugar, make a simple syrup.
Of course there are different ways of doing it, some people don't put the lids on until after the jars (still hot) are removed from the oven. Canning jars can break in the oven while heating, just like they do in the water bath or pressure canners.