From: root Date: Sun, 18 Nov 2007 00:21:34 +0000 (+0000) Subject: streamline the protocol a bit X-Git-Url: http://git.openbox.org/?a=commitdiff_plain;h=47abb9ff430ed61abed68a34d25524a3ebd85689;p=dana%2Furxvt.git streamline the protocol a bit --- diff --git a/src/rxvtc.C b/src/rxvtc.C index 92095707..4660a750 100644 --- a/src/rxvtc.C +++ b/src/rxvtc.C @@ -77,7 +77,17 @@ extern char **environ; int main (int argc, const char *const *argv) { + // instead of getcwd we could opendir (".") and pass the fd for fchdir *g* + char cwd[PATH_MAX]; + + if (!getcwd (cwd, sizeof (cwd))) + { + perror ("unable to determine current working directory"); + exit (STATUS_FAILURE); + } + client c; + { sigset_t ss; @@ -88,16 +98,6 @@ main (int argc, const char *const *argv) } c.send ("NEW"); - - // instead of getcwd we could opendir (".") and pass the fd for fchdir *g* - char cwd[PATH_MAX]; - - if (!getcwd (cwd, sizeof (cwd))) - { - perror ("unable to determine current working directory"); - exit (STATUS_FAILURE); - } - c.send ("CWD"), c.send (cwd); for (char **var = environ; *var; var++)