systemd files and tgtd outer loop
Matthew Patton <[email protected]> Mon, 7 Apr 2025 20:29:55 +0000
| Newsgroups | org.kernel.vger.stgt |
|---|---|
| Message-ID | <PH7PR04MB84841816D3D3C4AEA301606384AA2@PH7PR04MB8484.namprd04.prod.outlook.com> |
I'm using as-packaged in Ubuntu 24.04. But reading tgtd.c I was struck by s= ome of the logic.=0A= =0A= while I get the purpose of sd_notify(), technically and from an ordering pe= rspective, shouldn't that be only when '-exec' is called later on and targ= ets are defined? Or are we relying on one of the 'ExecPost' actions to blow= up and indicate the service is failed? But isn't that way too late? Downst= ream dependencies have already fired.=0A= =0A= I'm assuming '=97forground' is chosen in a systemD context is so that logs = will be picked up by systemD. So why not #ifdef USE_SYSTEMD to also emit th= e PID to stdout, if pidfile is undefined?=0A= =0A= Also the choice of LOG_WARNING in log_init() is highly unusual. It should b= e LOG_INFO if perhaps LOG_NOTICE. A routine message is never emitted at WAR= N.=