About-me-password backend



Dear almighty GNOME hackers, I'm in need of some pointers!

I'm currently hacking on the about-me password dialog (see #321567), which is spawning /usr/bin/passwd to authenticate and change the password. In the new dialog, I'm dividing the process in two, so that the user has to authenticate with his current password first (which spawns passwd to verify). If passwd doesn't complain and prompts for the new password, he can enter his new password, retype it and hit "Change password". When he hits the button, some time has elapsed since he first authenticated (and thus passwd was spawned).

Now my question is, what happens if passwd suddenly dies during that time period? Is it likely it will? If so, what's the best way to periodically(?) ensure that the process is running? Check every n seconds with waitpid() in the main loop? As far as I can see, this is how it's done in the current version - wait_child() is called every 4 seconds to check what the backend is doing...

Any pointers greatly appreciated :)

Btw, a more detailed mockup of the program/process flow can be found at http://joh.deworks.net/password-dialog/GnomeAboutMePassword.html

Best regards,

Johannes H. Jensen
deworks





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]