inetd

To inetd or not to inetd... when should I use inetd for my network server program?

Can anyone give a concise set of real-world considerations that would drive the choice of whether or not to use inetd to manage a program that acts as a network server? (If inetd is used, I think it alters the requirements around networking code in the program, so I think it's definitely programming-related and not general IT) The ques...

How to debug a weird threaded open fifo issue?

A web service is configured to expose some of its data when receiving a USR1 signal. The signal will be sent by a xinetd server when it receives a request from a remote client, e.g. nc myserver 50666. When the web server receives USR1 signal, it opens a dedicated fifo pipe, writes its data to the pipe, and then close the pipe. In the mea...

Why does write() to pipe exit program when pipe writes to stdout?

I have a server application that writes to a popen("myCommand", "w") file descriptor in a separate thread and if the command passed to popen() results in any output to stdout or stderr, the my application exits. However, this is only an issue when my server application was invoked via inetd, if I used ssh to launch the server, it does n...

Why can't gdb attach to server application summoned with inetd?

I have a server application that can be summoned for the client using inetd. However, if I try to attach to the server process that was launched with inetd, I get the following response: ptrace: Operation not permitted. gdb --annotate=3 /my/app/here <processId> Current directory is /usr/local/bin/ GNU gdb 6.8 Copyright (C) 2008 Free S...

How to find location of executable on Linux when normal methods fail?

In another question, the answer states that on Unixes with /proc, the really straight and reliable way is to readlink("/proc/self/exe", buf, bufsize) and it then proceeds to give backup solutions as follows: On Unixes without /proc (i.e. if above fails): If argv[0] starts with "/" (absolute path) this is the path. Otherwise if argv[0]...

How to get client IP from java server through xinetd ?

Hi, I am running a small java server through xinetd superserver. I'd like to get the originating client IP but I can't because streams are between xinetd and java (stin/stdout). Does somebody know how to get the client IP, without looking to xinetd logfile ? (seems a bad solution to me) Thanks ! ...

Terminating inetd service

Hi, I have written some simple inetd-Service in C. It reads a string from the user, compares it to another string and then terminates. At least, this is what I want it to do. After reaching the return(0);-statement in main(), it simply restarts and presents me a new prompt. Is there any way to tell inetd that it should terminate the co...

Python: Run WSGI server from inetd?

As the title suggests, is it possible to run a WSGI server from (x)inetd? ...

Getting client IP from Ruby script through xinetd

How can I get the client IP Address from inside a Ruby script that is launched by xinetd through a stream socket? In PHP I would just use stream_socket_get_name(STDIN, true); Thanks in advance! ...

Starting a Process When a Port is Connected To

I want to create a single client that issues unicast requests for data from any of many workstations on the same LAN. The client will likely run Linux, but the workstations may run any OS. Is it possible to avoid running a daemon on each of the workstations and yet have them reply to requests within a few seconds? I want to avoid creatin...

xinetd udp server - need access to message sent in PHP

I am invoking a script via xinetd with the following service definition: service gpsservice { socket_type = dgram protocol = udp wait = yes user = root server = path/to/my_php_script.php log_on_sucess = HOST PID USERID disable = no } which successfully lau...