Originally posted by xjjohnno M42 lenses are not going to auto focus, same with M mount lenses, is that what you are trying to get happening Res3567? Auto focussing is only going to start happening with F series and later lenses where the drive mechanisms have been built into the lenses.
I don't believe res3567 is trying to auto focus the lens. He/she is trying to use the AF-S setting to prevent the shutter from firing until manual focus is achieved (focus trapping), but it seems the shutter just fires instantly when the M42 is attached.
Conducting a quick test, I find that my K10D will release the shutter w/o focus being locked in AF-S mode with
no lens attached. This tells me that there is an electrical continuity issue with the contacts on the lens mount. I'd try newarts' tin foil suggestion.