In 1996 when it was passed, the Canada Transportation Act put in a process to facilitate the abandonment of rail lines. Since then we've had the creation of a large number of short-line railways across the country. I think there's a total of 60 across Canada right now.
CN and CP have kept the primary highways and quite an extensive network in western Canada, so the majority of the network remains in the hands of Canadian Pacific and Canadian National.
Several of the short-line railways are also under federal jurisdiction if they cross provincial boundaries, so they would be subject to this process. If they are under provincial jurisdiction, they would not be subject to this process.