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

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

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

subprocess_popen_preexec_fn.py:12:26: PLW1509 `preexec_fn` argument is unsafe when using threads
   |
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
13 | 
14 | # Non-errors.
   |


