On Wed, Jul 09, 2008 at 12:39:13AM +0800, chenyun_zhou wrote:
>  Hi, everyone
>  
>  I am try to write a program to edit smb.conf, and the question is "
>   If I open smb.conf for editing, but other process such as smbd , nmbd and 
> winbind is reading the file, How to handle the this collision, and I want to 
> open this file immediaetly ,and afte closing this file , tell these process 
> to read it."

Do what all other unix programs do in this circumstance.
Create a temp smb.conf file and then do an atomic rename
into place. The next time smbd/nmbd re-read the file (or
when you tell them to do it via a MSG_SMB_CONF_UPDATED
message) they'll see the new contents.

Hope this helps,

Jeremy.
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba

Reply via email to