[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: defuncted printf process when using wpa_supplicant

From: Chet Ramey
Subject: Re: defuncted printf process when using wpa_supplicant
Date: Wed, 30 Mar 2022 10:14:49 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.7.0

On 3/30/22 1:40 AM, Alex fxmbsw7 Ratchev wrote:
> i do
> wpa_supplicant -i"$if" -c<( printf %s\\n \
> 'network={' "ssid=\"$ssid\"" "psk=\"$pass\"" '}'
> ) &
> { sleep 3 ; dhclient "$if" ; } &
> which is simply wpa_supplicant -iiface -c<( conf file printing )
> it since years resuts in such : i think before it said printf defuncted

Since printf is a shell builtin, there's no way for ps to reliably
determine the name of the command in the process substitution.

> root      1530  0.0  0.0      0     0 ?        Z    07:19   0:00  \_
> [3.wpa] <defunct>

Since the command is asynchronous, the shell forks and does word expansion
in the subshell, at which point it creates the pipes for the process
substitution. It then suppresses any additional forks and simply execs the
sleep process. The shell started to run the process substitution sits there
peacefully, not consuming any resources, until wpa_supplicant exits and
everything gets reaped by init/systemd/whatever.

``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    chet@case.edu    http://tiswww.cwru.edu/~chet/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]