Thanks for the help Alex, it works now, I use this line to start:

(call "sh" "-c" "./p projects/rss-reader/word_index.l -go 1 -wait >>
index.log 2>&1 &")

Combined with this go function:

(de go ()
   (setq *IdxNum (format (opt)))
   (setq *DbDir (pack "/opt/resources/index" *IdxNum "/"))
   (unless (info *DbDir)
      (call 'mkdir *DbDir))
   (setq *DbDir (pack *DbDir "db/") )
   (unless (info *DbDir)
      (call 'mkdir *DbDir))
   (pool (pack *DbDir "db"))
   (task (port (+ *IdxNum 4040))
      (let? Sock (accept @)
         (unless (fork)
            (in Sock
               (while (rd)
                  (sync)
                  (out Sock
                     (pr (eval @)))))
            (bye))
         (close Sock)))
   (forked))

Something that compounded the confusion earlier was the fact that I
was calling (go) at the end of word_index.l; probably a result of
trial and error testing in response to the behavior you describe
above. So when copying lines back and forth I was suddenly calling go
twice, or perhaps not at all sometimes.





On Sun, Feb 7, 2010 at 5:38 PM, Alexander Burger <a...@software-lab.de> wrot=
e:
> On Sun, Feb 07, 2010 at 05:22:08PM +0100, Alexander Burger wrote:
>> How does "word_index.l" handle the arguments following the single '-'?
>>
>> =A0 =A0.../word_index.l - 1 -go -wait ...
>>
>> A single dash inhibits the evaluation of further arguments, so
>
> I would suggest that you call it as
>
>> =A0 =A0.../word_index.l -go 1 -wait ...
>
> and have 'go' call (format (opt)) to retrieve the number '1'. 'opt' will
> skip this argument, so that when 'go' is done, 'wait' will be executed
> as desired.
>
> Cheers,
> - Alex
> --
> UNSUBSCRIBE: mailto:picol...@software-lab.de?subject=3dunsubscribe
>
-- 
UNSUBSCRIBE: mailto:picol...@software-lab.de?subject=unsubscribe

Reply via email to