Locks are not shared with the nsd process. The libnsd library came about as a result of folks wanting some of the AOLserver core Tcl APIs from within stand alone tclsh processes.

You might also want to look at the new nsproxy module. That code allows you to start a pool of tclsh processes that you can send commands to. It's a great way to deal with code which is not thread safe, since each tclsh, by default, is single threaded. The tclsh processes are fork'd and exec'd from the main nsd process.

Example:

                    ns_proxy pool
                   -----------------
nsd (MT) <----> tclsh (ST)
             <----> tclsh (ST)
             <----> tclsh (ST)

- n
 
 
-----Original Message-----
From: [EMAIL PROTECTED]
To: [email protected]
Sent: Tue, 15 Aug 2006 5:52 PM
Subject: [AOLSERVER] question about libnsd loading in tclsh

In the 4.5 release docs, it was announced: 
 
libnsd: 
  The AOLserver library now includes an entry point suitable 
  for loading into an ordinary, thread-enabled, tclsh, e.g.,: 
 
  # tclsh 
  % load /usr/local/aolserver/lib/libnsd.so 
  % ns_time 
 
Does this loaded libnsd.so share locks, such as ndb_handles and semaphores with an already running nsd? 
 
I assume not, but thought I'd ask... 
 
What I'm trying to do is run command-line tcl commands that would access my berkeleydb database while aolserver is still running, and if two separate processes are writing the same db file, it gets corrupted. 
 
-john 
 
-- 
AOLserver - http://www.aolserver.com/ 
 
To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> with the 
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: field of your email blank. 

Check out AOL.com today. Breaking news, video search, pictures, email and IM. All on demand. Always Free.

-- AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> with the body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: field of your email blank.



Reply via email to