… | |
… | |
186 | } |
186 | } |
187 | |
187 | |
188 | envv->push_back (0); |
188 | envv->push_back (0); |
189 | |
189 | |
190 | { |
190 | { |
191 | char **old_environ = environ; |
|
|
192 | environ = envv->begin (); |
|
|
193 | |
|
|
194 | rxvt_term *term = new rxvt_term; |
191 | rxvt_term *term = new rxvt_term; |
195 | |
192 | |
196 | term->log_hook = &log_cb; |
193 | term->log_hook = &log_cb; |
197 | term->getfd_hook = &getfd_cb; |
194 | term->getfd_hook = &getfd_cb; |
198 | term->argv = argv; |
195 | term->argv = argv; |
… | |
… | |
209 | success = false; |
206 | success = false; |
210 | } |
207 | } |
211 | |
208 | |
212 | term->log_hook = 0; |
209 | term->log_hook = 0; |
213 | |
210 | |
214 | environ = old_environ; |
|
|
215 | chdir ("/"); |
211 | chdir ("/"); |
216 | |
212 | |
217 | if (!success) |
213 | if (!success) |
218 | term->destroy (); |
214 | term->destroy (); |
219 | |
215 | |