Subject: RE: LDAP Client API in C with Notification of the end of a reques t

From: "George Xu" <[email-masked]>
Date: Fri, 25 May 2001 09:34:33 -0400

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:[email-masked]]
Sent: Thursday, May 24, 2001 11:17 PM
To: [email-masked]
Cc: [email-masked]
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

---

From: Lloyd Wood <[email-masked]>
Date: Fri, 25 May 2001 16:44:20 +0100 (BST)

> can find the material supporting your point here?

type 

man strtok

on a unix box.

L.

<[email-masked]>PGP<http://www.ee.surrey.ac.uk/Personal/L.Wood/>

---

From: Lloyd Wood <[email-masked]>
Date: Fri, 25 May 2001 16:44:05 +0100 (BST)

type 

man strtok

on a unix box.

L.