Add `mutate_flag` parameter for `fcntl.fcntl`
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- Python
- Estrellas
- 77.2k
- Forks
- 36k
- Métricas de merge de PR
- Métricas de PR pendientes
Descripción
Feature or enhancement
Proposal:
fcntl.ioctl has a mutate_flag parameter. When set to True, it will pass the arg buffer to the underlying ioctl syscall directly. This is useful for receiving the result which will be written to the arg buffer.
However, fcntl.fcntl doesn't have this parameter, and it only returns bytes as the modified arg buffer. Users need to parse the bytes using the struct module, even if they have a well-defined structure that already implements the write buffer protocol.
Has this already been discussed elsewhere?
This is a minor feature, which does not need previous discussion elsewhere
Links to previous discussion of this feature:
No response
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Comienza por los puntos de entrada fcntl.fcntl y fcntl.ioctl, comparando cómo ioctl gestiona mutate_flag con el comportamiento actual de fcntl. Revisa las pruebas existentes de fcntl y las expectativas del buffer protocol; el trabajo estará terminado cuando fcntl.fcntl admita el parámetro propuesto y las pruebas cubran la recepción del buffer modificado sin requerir struct parsing.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- python
- Área
- operating-systems
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100