… | |
… | |
15 | contacting the daemon. |
15 | contacting the daemon. |
16 | |
16 | |
17 | =head1 OPTIONS |
17 | =head1 OPTIONS |
18 | |
18 | |
19 | All options that are valid for B<@@RXVT_NAME@@> are valid for |
19 | All options that are valid for B<@@RXVT_NAME@@> are valid for |
20 | B<@@RXVT_NAME@@c>, too. Please note that all options are currently |
20 | B<@@RXVT_NAME@@c>, too. Please note that options are interpreted in the |
21 | interpreted in the context of the daemon process, which makes a difference |
21 | context of the daemon process. However, as current working directory, |
22 | for options that specify a file descriptor (such as B<-pty-fd>). |
22 | process environment and any file handles (e.g. for C<-pty-fd>) are |
|
|
23 | preserved, this rarely makes a difference. |
23 | |
24 | |
24 | =head1 EXIT STATUS |
25 | =head1 EXIT STATUS |
25 | |
26 | |
26 | If everything went well, @@RXVT_NAME@@c returns with an exit status of C<0>. |
27 | If everything went well, @@RXVT_NAME@@c returns with an exit status of C<0>. |
27 | If contacting the daemon fails, it exits with the exit status C<2>. In all other error |
28 | If contacting the daemon fails, it exits with the exit status C<2>. In all other error |
28 | cases it returns with status C<1>. |
29 | cases it returns with status C<1>. |
29 | |
30 | |
30 | This can be used to implement auto-starting behaviour, by checking for an |
31 | This can be used to implement auto-starting behaviour, by checking for an |
31 | exit status of C<2>, running C<@@RXVT_NAME@@d -f -q> and retrying the call |
32 | exit status of C<2>, running C<@@RXVT_NAME@@d -f -q> and retrying the call |
|
|
33 | to @@RXVT_NAME@@c, like this: |
|
|
34 | |
|
|
35 | #!/bin/sh |
32 | to @@RXVT_NAME@@c. |
36 | @@RXVT_NAME@@c "$@" |
|
|
37 | if [ $? -eq 2 ]; then |
|
|
38 | @@RXVT_NAME@@d -q -o -f |
|
|
39 | @@RXVT_NAME@@c "$@" |
|
|
40 | fi |
33 | |
41 | |
34 | =head1 ENVIRONMENT |
42 | =head1 ENVIRONMENT |
35 | |
43 | |
36 | All environment variables of the current process will be made available |
44 | All environment variables of the current process will be made available |
37 | to the new instance, and will be interpreted as if B<@@RXVT_NAME@@> were |
45 | to the new instance, and will be interpreted as if B<@@RXVT_NAME@@> were |