[Bese-devel] Re: Load a custom ucwctl.conf

Luca Capello luca at pca.it
Tue Apr 18 21:23:27 UTC 2006


Hello!

On Mon, 17 Apr 2006 23:10:38 +0200, Luca Capello wrote:
> The first problem with the default /var is that a normal user cannot
> create files/folders in it, so I think we need to default to
> $HOME/var for a normal user when $VARROOT is empty (already present
> in the attached patch).  In case an user (root or not) want to start
> two instances, he needs to specify the necessary variables.

I committed a patch that do exactly the above: it defaults to
$HOME/var if $USER = "root" and this check should be POSIX-compliant,
not only bash-compliant ;-)

> The other problem is the one you pointed out: with the default
> values (and with the commands ucwctl uses), if you start two
> processes they'll try to share the same socket (impossible) and log
> files (undesirable).  So, we need to modify how we create sockets,
> pid and log files.

Actually, this is not needed, because detachtty refuses to start:
=====
gismo at innerloop:~$ sh ucwctl start

gismo at innerloop:~$ tail -n 5 var/log/ucw/ucw.dribble
STYLE-WARNING: implicitly creating new generic function \
 MAKE-WORKER
STYLE-WARNING: implicitly creating new generic function \
 PENDING-REQUEST-VALIDP
--TIME MARK 2006-04-18--
22:52 UCW-LOGGER/+INFO+: Starting up standard server \
 #<STANDARD-SERVER MULTITHREAD-HTTPD-BACKEND 3 {B705791}>.
*

gismo at innerloop:~$ sh ucwctl start
;;; detachtty: 1145393675: Is "/home/gismo/var/run/ucw/ucw.socket" \
 a dead socket from a previous run?

;;; detachtty: 1145393675: FATAL bind (Address already in use)
ucwctl: line 248:  8775 Terminated              $DETACHTTY
--dribble-file "$LOGROOT"/ucw.dribble --log-file
"$LOGROOT"/ucw.detachtty --pid-file "$RUNROOT"/ucw.pid
"$RUNROOT"/ucw.socket $CLLAUNCH -X $OPT_LISP $OPT_PATH NO_QUIT=yes --
"$STARTFILE"
gismo at innerloop:~$
=====

I corrected the ugly output above ("$FOLDER"/file), sorry for the
first not-styled patch :-(

> Another option we can add is the ability to use ucwctl without
> detachtty, something like -d or --no-detachtty: it starts UCW via
> cl-launch, but on the same terminal you are.  Could it be useful?

With this option, obviously, we need to create a false socket and pid,
so we can know if another process is running.

Thx, bye,
Gismo / Luca
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 188 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/bese-devel/attachments/20060418/9b4e69f5/attachment.sig>


More information about the bese-devel mailing list