newLISP Fan Club

Forum => newLISP in the real world => Topic started by: newdep on November 22, 2005, 02:29:03 AM

Title: inetd mode with -L
Post by: newdep on November 22, 2005, 02:29:03 AM
Hi Lutz,



Seems that newlisp is not reacting on the -L when it runs in inetd mode.

"/usr/bin/newlisp -L -c program" does launch the program but no logging...



Regards, Norman.
Title:
Post by: Lutz on November 22, 2005, 05:53:04 AM
Make sure newlisp has writing permissions in it's current directory. To find out it's current diectory, just telnet into the inetd port and enter: (directory)



Lutz
Title:
Post by: newdep on November 22, 2005, 06:08:33 AM
Hi lutz,



Actualy newlisp runs within inetd as root ...

Has it someting to do with the -c ?



Regards, Norman.
Title:
Post by: Lutz on November 22, 2005, 09:29:37 AM
newlisp -c -L on the command line works fine and does logging. inetd uses stdio pipes, so it should be the same. What if you create the file first with: touch newlisp-log.txt ?



Lutz
Title:
Post by: newdep on November 22, 2005, 10:41:52 AM
Hi Lutz,



I would love to say it works ;-) but I tried it all.. No results.. its odd..

Anyways.. Ill fiddle a littl emore and see what it could be..



Regards, Norman.
Title:
Post by: newdep on December 08, 2005, 12:22:06 PM
Hi Lutz,



I tested again the -L with mode but it does not work in combination

in inetd.conf.. not even touched.. its odd..the logfile is nowhere on my disk..



Did you had a look at it already?



net-eval stream tcp nowait newlisp.newlisp /home/newlisp/bin/newlisp -c -L /home/newlisp/bin/remote.lsp



Regards, Norman.
Title:
Post by: newdep on December 08, 2005, 12:37:40 PM
Sorry for all the fuzz! it works fine !



Root puts the newlisp-log.txt inside the / directory ! if running from inetd mode.



Regards, Norman.
Title:
Post by: Lutz on December 08, 2005, 12:45:01 PM
Yes, I looked into it and it works fine for me on OSX 10.4 using xinetd. It shouldn't be different on inetd.



This is my xinetd configuration:

service net-eval
{
        socket_type = stream
        wait = no
        user = lutz
        server = /usr/bin/newlisp
        port = 4711
        server_args = -c -L
        only_from = localhost
}


The log file is written to the root directory, where the user 'lutz' has write permissions.



This must be a permissions issue. What is your inetd file configuration entry?



Try to telnet into the port and try to create a file:



(write-file "junkfile" "hello world")



Is the file written? What is the current directory?



Lutz



ps: and don't forget the entry in /etc/services
Title:
Post by: newdep on December 08, 2005, 01:00:27 PM
yups thanks no problems see above...:-)