No one knows what will happen after Kim Jong Il dies. No one knows the true, hidden power structure in North Korea. Remember the history of China after the the death of Mao - everything changed very quickly and certainly not to for the worse:
After Mao's death in 1976 and the arrest of the Gang of Four, blamed for the excesses of the Cultural Revolution, Deng Xiaoping quickly wrested power from Mao's anointed successor Hua Guofeng. Although Deng never became the head of the Party or State himself, though Deng was in fact the Paramount Leader of China at that time, his influence within the Party led the country to economic reforms of significant magnitude. The Communist Party subsequently loosened governmental control over citizens' personal lives and the communes were disbanded with many peasants receiving multiple land leases, which greatly increased incentives and agricultural production. This turn of events marked China's transition from a planned economy to a mixed economy with an increasingly open market environment, a system termed by some[20] "market socialism". The PRC adopted its current constitution on 4 December 1982
With regard to NK's nuclear/ missile program, it is logical to assume only China can really put enough pressure on them to stop these destabilizing activities. It really is in China's best efforts to have a stable global trading environment. Countries like Japan and South Korea + plus many others in the world (including the US), are not going to let China play it both ways... they cannot support NK and still have all the benefits of being in the WTO. Think what an American boycott of Chinese goods would do to their economy.
If NK wants to sell its technology to other countries, then NK's list of enemies grows even longer. Possible customers for NK include Syria and Myanmar. Suddenly, all of SE Asia and India become possible targets! Considering the dust kicked up by Iran having nukes, I am sure Israel would never allow Syria to have a deployable nuclear weapons system.
All of this points to one conclusion... acting almost as a block, the world will put very heavy pressure on China to shut down NK's nuclear program. My guess they are feeling the pressure now. In all likelihood, their influence with crazy Kim Jong is not that great. So now, China is just waiting for Kim Jong Il to die, and then threaten a new regime to cut off all trade with NK until the nukes are dismantled.