Commit d9a0c2d
committed
Switch from PTY to pipe for service log redirection
The PTY approach caused isatty() to return true for services using
the log directive, triggering programs like fprintd (using glib) to
emit ANSI escape codes and other TTY-specific formatting in syslog.
Using a standard pipe ensures isatty() correctly returns false, so
programs produce plain text output suitable for logging.
For services that require line-buffered output, users can wrap the
command with `stdbuf -oL` as documented in doc/config/logging.md.
Fixes #455
Signed-off-by: Joachim Wiberg <[email protected]>1 parent 178301b commit d9a0c2d
2 files changed
+37
-22
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
274 | 274 | | |
275 | 275 | | |
276 | 276 | | |
| 277 | + | |
277 | 278 | | |
278 | 279 | | |
279 | 280 | | |
280 | 281 | | |
281 | | - | |
282 | | - | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
283 | 285 | | |
284 | | - | |
285 | | - | |
286 | | - | |
287 | | - | |
288 | | - | |
289 | | - | |
290 | | - | |
291 | | - | |
292 | | - | |
| 286 | + | |
| 287 | + | |
293 | 288 | | |
| 289 | + | |
294 | 290 | | |
295 | 291 | | |
| 292 | + | |
296 | 293 | | |
297 | 294 | | |
298 | 295 | | |
| |||
322 | 319 | | |
323 | 320 | | |
324 | 321 | | |
325 | | - | |
326 | 322 | | |
327 | 323 | | |
328 | 324 | | |
329 | | - | |
330 | | - | |
331 | | - | |
332 | | - | |
333 | | - | |
334 | | - | |
335 | | - | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
336 | 328 | | |
337 | 329 | | |
338 | 330 | | |
| |||
388 | 380 | | |
389 | 381 | | |
390 | 382 | | |
391 | | - | |
392 | | - | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
393 | 386 | | |
394 | | - | |
| 387 | + | |
395 | 388 | | |
396 | 389 | | |
397 | 390 | | |
| |||
0 commit comments