-.\" $OpenBSD: getprogname.3,v 1.4 2013/07/31 16:43:27 deraadt Exp $
+.\" $OpenBSD: getprogname.3,v 1.5 2015/05/05 14:37:20 schwarze Exp $
.\"
.\" Copyright (c) 2001 Christopher G. Demetriou
.\" All rights reserved.
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd $Mdocdate: July 31 2013 $
+.Dd $Mdocdate: May 5 2015 $
.Dt GETPROGNAME 3
.Os
.Sh NAME
The
.Fn setprogname
function sets the name of the program to be the last path component of the
-.Fa progname
+.Fa name
argument.
Internally, only the pointer to the given string is kept as the program name,
so it should not be modified and the storage for the string must remain valid
.Xr setproctitle 3
.Sh HISTORY
The
-.Nm getprogname
+.Fn getprogname
and
-.Nm setprogname
+.Fn setprogname
functions first appeared in
.Ox 5.4
as function-based wrappers around the