Checkpassword and FD3 - the problem
"Jim Ramsay" <[email protected]> Wed, 9 Apr 2003 16:16:03 -0600
| Newsgroups | gmane.comp.djb.checkpassword |
|---|---|
| Message-ID | <[email protected]> |
The problem: Systems which use uthread as the threading implementation take up file descriptors 3 and 4 with a pipe apparently used to do signalling between threads? I don't really know what it's for - I just know that my python program (python uses pthreads and thus uthread) cannot close or dup2 FD3, so that it is very difficult to use checkpassword directly. I have the obvious kludge solutions like calling "/bin/sh -c 'python 3</dev/null'", calling python from a C wrapper which opens a file first, or calling "/bin/sh -c 'checkpassword 3<&0'" from within python, but these are not very nice. I'm very curious: Why is the checkpassword interface so married to FD#3? Why not stdin? Why can't I set the env variable "CHECKPASSWORDFD=125" and have it use that instead, or have some other configurable mechanism to force a different FD? If there's a FAQ about this somewhere, please direct me to it! -- Jim Ramsay [email protected]