James,
Very interesting statement about strtok(). Do you know which OS or where I
can find the material supporting your point here?
Thanks
-----Original Message-----
From: James P. Salsman [mailto:bovik(_at_)best(_dot_)com]
Sent: Thursday, May 24, 2001 11:17 PM
To: laurent(_dot_)forest(_at_)ca(_dot_)sema(_dot_)com
Cc: ietf(_at_)ietf(_dot_)org
Subject: Re: LDAP Client API in C with Notification of the end of a
request
... The only way to check
if a request is completed is to call the "ldap_result()" function for the
messageId of each outstanding request, in a waiting or polling mode....
If you are compiling in an envionment that supports threads, make a
new thread to call ldap_result() in waiting (blocking) mode, and then
notify your main thread when it returns. If you are unable or
unwilling to use threads (perfectly sensible) then concurrent
process(es) can be used.
By the way, the only non-threadsafe function in the C standard library
these days is strtok(); don't use that (or any function saving global
state in static variables; meant to be called from more than one place)
if you want your code to be threadsafe.
Cheers,
James