Revert "remove progname stuff"

This reverts commit 60d6e234c3e58a71b43db79056b335e9e34f9162.