Deadlock with libsmbclient functions and Multiple forked processes

Akshay V Rao avrao at
Fri Jun 13 14:23:05 GMT 2003

Well, in each forked process I perform an smbc_open(), smbc_read(), and
smbc_close(). Do I need to do an smbc_init() before I call these functions
even though I already did an smbc_init() before I forked the processes?

Friday, June 13, 2003 10:14 AM
To: Akshay V Rao/Poughkeepsie/IBM at IBMUS
cc: samba-technical at
From: Andrew Bartlett <abartlet at>
Subject: Re: Deadlock with libsmbclient functions and Multiple    forked

On Sat, 2003-06-14 at 00:08, Akshay V Rao wrote:
> Well, I tried doing this using threads in the first place but found out
> that libsmbclient was not thread safe.  I then moved to forked processes,
> therefore, it is in a different address space.  I am not sure that if I
> open and close (and read) connections in each forked process, shouldn't
> they be different because they exist in different address spaces - where
> threads exist in the same address space.

Sure, but each needs to make it's own connection to the server...

Andrew Bartlett

Andrew Bartlett                                 abartlet at
Manager, Authentication Subsystems, Samba Team  abartlet at
Student Network Administrator, Hawker College   abartlet at
 (Attachments removed)

More information about the samba-technical mailing list