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.45 by root, Tue Feb 19 18:58:05 2008 UTC vs.
Revision 1.46 by root, Sun Jun 15 13:54:15 2008 UTC

172 172
173 if (!strcmp (tok, "END")) 173 if (!strcmp (tok, "END"))
174 break; 174 break;
175 else if (!strcmp (tok, "ENV") && recv (tok)) 175 else if (!strcmp (tok, "ENV") && recv (tok))
176 envv->push_back (strdup (tok)); 176 envv->push_back (strdup (tok));
177 else if (!strcmp (tok, "CWD") && recv (tok))
178 {
179 if (chdir (tok))
180 {
181 delete envv;
182 delete argv;
183 return err ("unable to change to working directory to '%s', aborting: %s.\n",
184 (char *)tok, strerror (errno));
185 }
186 }
187 else if (!strcmp (tok, "ARG") && recv (tok)) 177 else if (!strcmp (tok, "ARG") && recv (tok))
188 argv->push_back (strdup (tok)); 178 argv->push_back (strdup (tok));
189 else 179 else
190 return err ("protocol error: unexpected NEW token.\n"); 180 return err ("protocol error: unexpected NEW token.\n");
191 } 181 }
209 success = false; 199 success = false;
210 } 200 }
211 201
212 term->log_hook = 0; 202 term->log_hook = 0;
213 203
214 chdir ("/"); 204 chdir ("/"); // init might change to different working directory
215 205
216 if (!success) 206 if (!success)
217 term->destroy (); 207 term->destroy ();
218 208
219 send ("END"); send (success ? 1 : 0); 209 send ("END"); send (success ? 1 : 0);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines