~serge-hallyn/ubuntu/saucy/lxc/lxc-dnsmasq

« back to all changes in this revision

Viewing changes to src/lxc/lxc_console.c

  • Committer: Stéphane Graber
  • Date: 2013-02-18 15:20:18 UTC
  • mto: This revision was merged to the branch mainline in revision 190.
  • Revision ID: stgraber@ubuntu.com-20130218152018-ls2gi9hkqs2kuhj8
Tags: upstream-0.9.0~alpha3
Import upstream version 0.9.0~alpha3

Show diffs side-by-side

added added

removed removed

Lines of Context:
144
144
        }
145
145
 
146
146
        /* we want to exit the console with Ctrl+a q */
147
 
        if (c == my_args.escape) {
 
147
        if (c == my_args.escape && !wait4q) {
148
148
                wait4q = !wait4q;
149
149
                return 0;
150
150
        }
182
182
        int err, std_in = 1;
183
183
        struct lxc_epoll_descr descr;
184
184
        struct termios newtios, oldtios;
 
185
        /* TODO: add cmdline arg to specify lxcpath */
 
186
        char *lxcpath = NULL;
185
187
 
186
188
        err = lxc_arguments_parse(&my_args, argc, argv);
187
189
        if (err)
188
190
                return -1;
189
191
 
190
 
        err = lxc_log_init(my_args.log_file, my_args.log_priority,
 
192
        err = lxc_log_init(my_args.name, my_args.log_file, my_args.log_priority,
191
193
                           my_args.progname, my_args.quiet);
192
194
        if (err)
193
195
                return -1;
198
200
                return -1;
199
201
        }
200
202
 
201
 
        err = lxc_console(my_args.name, my_args.ttynum, &master);
 
203
        err = lxc_console(my_args.name, my_args.ttynum, &master, lxcpath);
202
204
        if (err)
203
205
                goto out;
204
206
 
205
 
        fprintf(stderr, "\nType <Ctrl+%c q> to exit the console\n",
 
207
        fprintf(stderr, "\n\
 
208
Type <Ctrl+%1$c q> to exit the console, \
 
209
<Ctrl+%1$c Ctrl+%1$c> to enter Ctrl+%1$c itself\n",
206
210
                'a' + my_args.escape - 1);
207
211
 
208
212
        err = setsid();