Fixup include file framework_main macro / add lockpid prototype