---
source: crates/ruff_linter/src/rules/pylint/mod.rs
---
PLW1509 `preexec_fn` argument is unsafe when using threads
  --> subprocess_popen_preexec_fn.py:9:18
   |
 8 | # Errors.
 9 | subprocess.Popen(preexec_fn=foo)
   |                  ^^^^^^^^^^^^^^
10 | subprocess.Popen(["ls"], preexec_fn=foo)
11 | subprocess.Popen(preexec_fn=lambda: print("Hello, world!"))
   |

PLW1509 `preexec_fn` argument is unsafe when using threads
  --> subprocess_popen_preexec_fn.py:10:26
   |
 8 | # Errors.
 9 | subprocess.Popen(preexec_fn=foo)
10 | subprocess.Popen(["ls"], preexec_fn=foo)
   |                          ^^^^^^^^^^^^^^
11 | subprocess.Popen(preexec_fn=lambda: print("Hello, world!"))
12 | subprocess.Popen(["ls"], preexec_fn=lambda: print("Hello, world!"))
   |

PLW1509 `preexec_fn` argument is unsafe when using threads
  --> subprocess_popen_preexec_fn.py:11:18
   |
 9 | subprocess.Popen(preexec_fn=foo)
10 | subprocess.Popen(["ls"], preexec_fn=foo)
11 | subprocess.Popen(preexec_fn=lambda: print("Hello, world!"))
   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
12 | subprocess.Popen(["ls"], preexec_fn=lambda: print("Hello, world!"))
   |

PLW1509 `preexec_fn` argument is unsafe when using threads
  --> subprocess_popen_preexec_fn.py:12:26
   |
10 | subprocess.Popen(["ls"], preexec_fn=foo)
11 | subprocess.Popen(preexec_fn=lambda: print("Hello, world!"))
12 | subprocess.Popen(["ls"], preexec_fn=lambda: print("Hello, world!"))
   |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
13 |
14 | # Non-errors.
   |
