Does it harm a system camera if you turn it off while it is in the process of taking a picture? For example during a long exposure or while the af needs very long?
I beg to differ from Jphi1618's comment of "No", but as he/she says, it may depend on which particular camera you have. L. Jordan, if you have an instruction manual for your camera, it may state somewhere in that about such issues.
For several digital cameras I've used and owned, the instruction manuals have specifically stated NOT to turn off camera while it is recording (while the red/orange light is flickering as it writes the data to the memory card). The result being that the data relating to the picture may be corrupted, and may not be readable / viewable when you playback on the screen, or transfer it to a computer.
It may depend on how sophisticated the camera, you probably should name the camera. But cameras have lots of smarts now, and my Nikon DSLR manual clearly says "If the camera is switched off while data remain in the buffer, the power will not turn off until all images in the buffer have been recorded. If the battery is exhausted while images remain in the buffer, the shutter release will be disabled and the images transferred to the memory card."
No, it is unlikely to harm the camera. However, harming the picture is a entirely different matter.
Think about it. The sensor takes power to operate. Even if the auto-focus and auto-aperture are done and the result frozen, the sensor still needs to be powered. It then also takes power to run more electronics that transfers the image data from the sensor to the memory when the exposure is complete. These processes just don't work without power, and turning the camera off almost certainly powers down these sections.
Generally, the more sophisticated the camera, the more it needs to be powered on to perform any of the normal camera functions. Even many film cameras couldn't be powered down during many types of exposure. If for no other reason, the shutter was timed and driven electronically.
Some film cameras had a fail-safe mode specifically for when the battery died. These were generally older models where users were uncomfortable relying on a battery since they'd just come from all-mechanical cameras. For example, my old Nikon F3T has such a mode. The shutter is fixed at the X-sync speed of 1/80 s, and you have to set the aperture manually. There is a special lever to release the shutter, since the normal button doesn't work without power. I got a nice picture of Morraine Lake in Banff National Park that way once, in 1985.
Nowadays cameras do a lot more for you, which is accomplished by electronics that has to be powered to do all those things.