Deadlock with libsmbclient functions and Multiple forked processes

Akshay V Rao avrao at us.ibm.com
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 lists.samba.org
From: Andrew Bartlett <abartlet at samba.org>
Subject: Re: Deadlock with libsmbclient functions and Multiple    forked
processes



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
as
> 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 pcug.org.au
Manager, Authentication Subsystems, Samba Team  abartlet at samba.org
Student Network Administrator, Hawker College   abartlet at hawkerc.net
 http://samba.org     http://build.samba.org     http://hawkerc.net
 (Attachments removed)




More information about the samba-technical mailing list