Martin v. Löwis <mar...@v.loewis.de> added the comment:

> Just for the record, I was about to try to do this, when I realized that 
> exposing prctl requires expecting a variable number of arguments with 
> variable types.
> It turns out providing a Python wrapper for such a kind of C API is just a 
> pain.
> There's an implementation though, handling 2 args only (instead of 5):
> https://github.com/seveas/python-prctl/blob/master/_prctlmodule.c#L9
> Considering that this also Linux-only, I don't think it really worths the 
> effort.

It's actually simpler than you think: I don't think any of the existing
controls uses arg4 and arg5. PR_MCE_KILL uses arg3, though. prctl is
really a set of system calls, and should be wrapped as such: each
control needs to be supported specifically. However, several of them
are similar, i.e. take either no argument, or have

Whether it's worth supporting it, I don't know. I stand by my original
proposition: if somebody would contribute this, I'd be in favor of
including it. I'm unlikely to write it on my own from scratch, though.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue5672>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to