Photochemical cyclization of olefinic N-chloroamides