Here are a couple things from California Consolidated dog laws.
(Please verify these. Fresno County Sheriff would be a good source)
Food and Agricultural Code (Formerly Agricultural Code). Division 14. Regulation and Licensing of Dogs. Chapter 4. Regulation.
§ 30955. Running at large on farm prohibited; exceptions
It is unlawful for any person to permit any dog which is owned, harbored, or controlled by him to run at large on any farm on which livestock or domestic fowls are kept, without the consent of the owner of the farm, except for herding livestock, hunting or sporting purposes, or any competitive trials when the dog is within reasonable control or call of his owner or the agent of his owner.
Food and Agricultural Code (Formerly Agricultural Code). Division 14. Regulation and Licensing of Dogs. Chapter 5. Killing and Seizure. Article 1. Generally.
§ 31102. Conditions involving livestock or poultry that permit the killing of a dog
Except in an area in which the provisions of Article 2 (commencing with Section 31151) of this chapter apply or as otherwise provided in Section 31104, any person may kill any dog in any of the following cases:
(a) The dog is found in the act of killing, wounding, or persistently pursuing or worrying livestock or poultry on land or premises which are not owned or possessed by the owner of the dog.
(b) The person has such proof as conclusively shows that the dog has been recently engaged in killing or wounding livestock or poultry on land or premises which are not owned or possessed by the dog's owner.
No action, civil or criminal, shall be maintained for the killing of any such dog.
On a personal note, I am a dog lover. Have 3 labs and an American English Coonhound, but I say shoot the dogs with something other then a gun that will scare or 'sting' them, laws or not. I agree with the above post and to make a run for when you are away, but I don't feel that you should have to build something to protect against those dogs.