--- rxvt-unicode/doc/rxvtc.1.man.in 2005/07/07 19:41:22 1.1 +++ rxvt-unicode/doc/rxvtc.1.man.in 2007/12/14 06:05:40 1.8 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.14 +.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.35 .\" .\" Standard preamble: .\" ======================================================================== @@ -128,8 +128,8 @@ .rm #[ #] #H #V #F C .\" ======================================================================== .\" -.IX Title "rxvt 1" -.TH rxvt 1 "2005-07-07" "5.6" "RXVT-UNICODE" +.IX Title "@@RXVT_NAME@@ 1" +.TH @@RXVT_NAME@@ 1 "2007-12-14" "8.7" "RXVT-UNICODE" .SH "NAME" @@RXVT_NAME@@c \- control the @@RXVT_NAME@@d daemon .SH "SYNOPSIS" @@ -145,9 +145,28 @@ .SH "OPTIONS" .IX Header "OPTIONS" All options that are valid for \fB@@RXVT_NAME@@\fR are valid for -\&\fB@@RXVT_NAME@@c\fR, too. Please note that all options are currently -interpreted in the context of the daemon process, which makes a difference -for options that specify a file descriptor (such as \fB\-pty\-fd\fR). +\&\fB@@RXVT_NAME@@c\fR, too. Please note that options are interpreted in the +context of the daemon process. However, as current working directory, +process environment and any file descriptor (e.g. for \f(CW\*(C`\-pty\-fd\*(C'\fR) are +preserved, this rarely makes a difference. +.SH "EXIT STATUS" +.IX Header "EXIT STATUS" +If everything went well, @@RXVT_NAME@@c returns with an exit status of \f(CW0\fR. +If contacting the daemon fails, it exits with the exit status \f(CW2\fR. In all other error +cases it returns with status \f(CW1\fR. +.PP +This can be used to implement auto-starting behaviour, by checking for an +exit status of \f(CW2\fR, running \f(CW\*(C`@@RXVT_NAME@@d \-f \-q\*(C'\fR and retrying the call +to @@RXVT_NAME@@c, like this: +.PP +.Vb 6 +\& #!/bin/sh +\& @@RXVT_NAME@@c "$@" +\& if [ $? -eq 2 ]; then +\& @@RXVT_NAME@@d -q -o -f +\& @@RXVT_NAME@@c "$@" +\& fi +.Ve .SH "ENVIRONMENT" .IX Header "ENVIRONMENT" All environment variables of the current process will be made available @@ -156,9 +175,10 @@ .IP "\fB\s-1RXVT_SOCKET\s0\fR" 4 .IX Item "RXVT_SOCKET" Both @@RXVT_NAME@@c and @@RXVT_NAME@@d use the environment variable -\&\fI\s-1RXVT_SOCKET\s0\fR to create a listening socket and to contact -the @@RXVT_NAME@@d, respectively. If the variable is missing, -\&\fI$HOME/.rxvt\-unicode\-\fI\fI\fR is used. +\&\fI\s-1RXVT_SOCKET\s0\fR to create a listening socket and to contact the +@@RXVT_NAME@@d, respectively. If the variable is missing, +\&\fI$HOME/.rxvt\-unicode\-\fI\fI\fR is used. The variable must +specify the absolute path of the socket to create. .SH "SEE ALSO" .IX Header "SEE ALSO" @@RXVT_NAME@@(7), @@RXVT_NAME@@d(1)