ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/rxvtc.C
(Generate patch)

Comparing rxvt-unicode/src/rxvtc.C (file contents):
Revision 1.14 by root, Mon Dec 20 16:44:31 2004 UTC vs.
Revision 1.15 by root, Mon Feb 14 20:46:47 2005 UTC

63 63
64int 64int
65main (int argc, const char *const *argv) 65main (int argc, const char *const *argv)
66{ 66{
67 client c; 67 client c;
68 char buf[PATH_MAX];
69
70 { 68 {
71 sigset_t ss; 69 sigset_t ss;
72 70
73 sigemptyset (&ss); 71 sigemptyset (&ss);
74 sigaddset (&ss, SIGHUP); 72 sigaddset (&ss, SIGHUP);
75 sigprocmask (SIG_BLOCK, &ss, 0); 73 sigprocmask (SIG_BLOCK, &ss, 0);
76 } 74 }
77 75
78 c.send ("NEW"); 76 c.send ("NEW");
77
79 // instead of getcwd we could opendir (".") and pass the fd for fchdir *g* 78 // instead of getcwd we could opendir (".") and pass the fd for fchdir *g*
80 c.send ("CWD"), c.send (getcwd (buf, sizeof (buf))); 79 char cwd[PATH_MAX];
80
81 if (!getcwd (cwd, sizeof (cwd)))
82 {
83 perror ("unable to determine current working directory");
84 exit (EXIT_FAILURE);
85 }
86
87 c.send ("CWD"), c.send (cwd);
81 88
82 for (char **var = environ; *environ; environ++) 89 for (char **var = environ; *environ; environ++)
83 c.send ("ENV"), c.send (*environ); 90 c.send ("ENV"), c.send (*environ);
84 91
85 const char *base = strrchr (argv[0], '/'); 92 const char *base = strrchr (argv[0], '/');

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines