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

Comparing rxvt-unicode/src/rxvtd.C (file contents):
Revision 1.25 by root, Tue Jan 17 15:43:49 2006 UTC vs.
Revision 1.26 by root, Sun Jan 22 00:36:59 2006 UTC

166 return err (); 166 return err ();
167 167
168 if (!strcmp (tok, "END")) 168 if (!strcmp (tok, "END"))
169 break; 169 break;
170 else if (!strcmp (tok, "ENV") && recv (tok)) 170 else if (!strcmp (tok, "ENV") && recv (tok))
171 envv->push_back (tok.get ()); 171 envv->push_back (strdup (tok));
172 else if (!strcmp (tok, "CWD") && recv (tok)) 172 else if (!strcmp (tok, "CWD") && recv (tok))
173 { 173 {
174 if (chdir (tok)) 174 if (chdir (tok))
175 err ("unable to change to working directory to '%s': %s", 175 err ("unable to change to working directory to '%s': %s",
176 (char *)tok, strerror (errno)); 176 (char *)tok, strerror (errno));
177 } 177 }
178 else if (!strcmp (tok, "ARG") && recv (tok)) 178 else if (!strcmp (tok, "ARG") && recv (tok))
179 argv->push_back (tok.get ()); 179 argv->push_back (strdup (tok));
180 else 180 else
181 return err ("protocol error: unexpected NEW token"); 181 return err ("protocol error: unexpected NEW token");
182 } 182 }
183 183
184 envv->push_back (0); 184 envv->push_back (0);
186 { 186 {
187 rxvt_term *term = new rxvt_term; 187 rxvt_term *term = new rxvt_term;
188 188
189 term->log_hook = &log_cb; 189 term->log_hook = &log_cb;
190 term->getfd_hook = &getfd_cb; 190 term->getfd_hook = &getfd_cb;
191 term->argv = argv;
192 term->envv = envv;
193 191
194 bool success; 192 bool success;
195 193
196 try 194 try
197 { 195 {
198 success = term->init (argv->size (), argv->begin ()); 196 success = term->init (argv, envv);
199 } 197 }
200 catch (const class rxvt_failure_exception &e) 198 catch (const class rxvt_failure_exception &e)
201 { 199 {
202 success = false; 200 success = false;
203 } 201 }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines