Bug 14161

Summary: inetd option to pipe service stderr to log
Product: Busybox Reporter: Wes <phpw>
Component: NetworkingAssignee: unassigned
Status: RESOLVED INVALID    
Severity: enhancement CC: busybox-cvs
Priority: P5    
Version: 1.33.x   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Host: Target:
Build:

Description Wes 2021-08-20 23:43:57 UTC
Hello, hopefully this is the appropriate place for an enhancement request.

Would it be possible to add a switch to send the stderr of inetd-invoked processes to the inetd logs?

Apparently most inetd manuals do not clearly define the handling of stderr, as mentioned in this commit / comment: https://git.busybox.net/busybox/commit/networking/inetd.c?id=0f952c249e30834a3ee5cd821e9afc3197b05f9c

> inetd: comment why we redirect stderr to network

> manpages of inetd I managed to find either say
> that stderr is also redirected to the network,
> or do not talk about redirection at all (!)

Without this capability, inetd-invoked processes need to handle logging independently, in a sometimes inconvenient or impractical way, such as running syslog or managing file logs (incl. rotation, permissions, etc).

Logging stderr output seems like the expected behavior to me, following the principle of least surprise. For a vaguely comparable example, php-fpm pipes stderr of invoked processes to its own log. Runit and supervisor also pipe output to their own log.

Thanks
Comment 1 Wes 2021-08-21 19:51:20 UTC
(In reply to Wes from comment #0)

Two more examples I discovered: both ipsvd and tcpserver send program stderr to the log.
Comment 2 Denys Vlasenko 2021-10-07 22:41:11 UTC
> Hello, hopefully this is the appropriate place for an enhancement request.

No, the place for discussions is mailing lists.

This is a bug database. People won't read it to discuss ideas.