Article delegate-en/1566 of [1-5169] on the server localhost:119
  upper oldest olders older1 this newer1 newers latest
search
[Top/Up] [oldest] - [Older+chunk] - [Newer+chunk] - [newest + Check]
[Reference:<_A1565@delegate-en.ML_>]
Newsgroups: mail-lists.delegate-en

[DeleGate-En] Re: DGROOT ignored on Win32
20 Mar 2002 01:27:02 GMT feedback@delegate.org (Yutaka Sato)


Hi,

On 03/19/02(03:20) you Manuel Martin <pdmdabdyi-y44okld7qljr.ml@ml.delegate.org> wrote
in <_A1565@delegate-en.ML_>
 |first of all, sorry for misspelling your name the first time.

"Yukata" sounds not so bad :p

 |> DGROOT is one of parameters which cannot be given in "+=parameters"
 |file
 |> unfortunately.  It must be specified in command line.
 |
 |Ah, yes, I did that at installation time (it is also set in the registry
 |for my service) and added this to the +=file just for documentation
 |purposes (later on on I forgot that .-)). But it doesn't work for "CRON
 |... -expire". I worked around this by setting also CACHEDIR, now the
 |cache is cleared, too.

Thank you for your description of the problem.  I could reproduce the
problem and have fixed it as the enclosed patch.  I uploaded the fixed
version to the FTP server, for confirmation you might do, at
<URL:ftp://ftp.delegate.org/pub/DeleGate/tmp/dg7_9_2a.exe>

The problem is caused because no command-line arguments, including DGROOT,
are passed directly to the DeleGate when it started as a service on
Windows, and I did not care it properly.

 |FYI, delegate *seems* to use normaly the correct path because of the
 |setting:
 |HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\DeleGate-PXXXX\Envi
 |ronments
 |ARGV:pwd="path_of_service_installation_time". NT switches to that path
 |at service-startup time (I think).

Sorry but I could not understand what you mean with this paragraph.
Are you mentioning another problem?

Cheers,
Yutaka
--
  @ @ Yutaka Sato <y.sato@delegate.org> http://www.delegate.org/y.sato/
 ( - ) National Institute of Advanced Industrial Science and Technology (AIST)
_<   >_ 1-1-4 Umezono, Tsukuba, Ibaraki, 305-8568 Japan


diff -cr delegate7.9.2/src/conf.c 792x/src/conf.c
*** delegate7.9.2/src/conf.c	Thu Feb 28 03:02:28 2002
--- 792x/src/conf.c	Wed Mar 20 09:01:58 2002
***************
*** 570,575 ****
--- 570,576 ----
  
  	pid = getpid();
  	if( DGROOT_done == pid )
+ 	if( *DELEGATE_DGROOT != 0 )
  		return 0;
  	DGROOT_done = pid;
  
diff -cr delegate7.9.2/src/delegated.c 792x/src/delegated.c
*** delegate7.9.2/src/delegated.c	Thu Mar  7 01:42:20 2002
--- 792x/src/delegated.c	Wed Mar 20 09:28:06 2002
***************
*** 2694,2699 ****
--- 2694,2707 ----
  	int IamServer;
  	int ai;
  
+ 	if( main_argc == 1 && 1 < ac ){
+ 		/* started as a service on Windows, main() receives no
+ 		 * arguments, then _main() receives real arguments via
+ 		 * the ServiceStart. Thus DGROOT which was initialized
+ 		 * in delegate_main() must be reinitialized here after. 
+ 		 */
+ 		DELEGATE_DGROOT = "";
+ 	}
  	main_argc = ac;
  	main_argv = dupv(av,0);
  

  admin search upper oldest olders older1 this newer1 newers latest
[Top/Up] [oldest] - [Older+chunk] - [Newer+chunk] - [newest + Check]
@_@V