dhcpcd-discuss

Re: dhcpcd doesn't start if standard output and error are redirected to a file

Roy Marples

Wed Jul 01 11:48:12 2020

Hi Juergen

On 30/06/2020 17:19, Juergen Daubert wrote:
as of 9.1.2 it's not longer possible to redirect both standard output
and standard error to a file. Works with 9.1.1 and with 9.1.2 if privsep
is disabled.

# dhcpcd --debug &> /tmp/dhcpcd.log
# ps ax | grep dhcp
  1285 ?        S      0:00 dhcpcd --debug
  1286 ?        S      0:00 dhcpcd --debug
  1289 pts/9    S+     0:00 grep dhcp
# cat /tmp/dhcpcd.log
dhcpcd-9.1.2 starting
spawned privileged actioneer on PID 1285
spawned network proxy on PID 1286
spawned controller proxy on PID 1287
udev: starting
dev: loaded udev
DUID 00:04:90:c0:16:40:d2:88:11:e7:a2:96:2c:fd:a1:5a:a7:99
chrooting to `/var/lib/dhcpcd' as dhcpcd
dhcpcd_fork_cb: truncated read 0 (expected 4)


This is on a Linux system.

Fixed here:
https://roy.marples.name/cgit/dhcpcd.git/commit/src?id=9776fd20289f01ff145fd19a3fb6c75e33e66349

Won't apply to dhcpcd-9.1.2 as it needs prior commits.

Roy

Follow-Ups:
Re: dhcpcd doesn't start if standard output and error are redirected to a fileJuergen Daubert
References:
dhcpcd doesn't start if standard output and error are redirected to a fileJuergen Daubert
Archive administrator: postmaster@marples.name