Revision 5b08fc10 vl.c
b/vl.c | ||
---|---|---|
7621 | 7621 |
timeout = 0; |
7622 | 7622 |
} |
7623 | 7623 |
} else { |
7624 |
if (shutdown_requested) |
|
7625 |
break; |
|
7624 | 7626 |
timeout = 10; |
7625 | 7627 |
} |
7626 | 7628 |
#ifdef CONFIG_PROFILER |
... | ... | |
8185 | 8187 |
|
8186 | 8188 |
#define MAX_NET_CLIENTS 32 |
8187 | 8189 |
|
8190 |
#ifndef _WIN32 |
|
8191 |
|
|
8192 |
static void termsig_handler(int signal) |
|
8193 |
{ |
|
8194 |
qemu_system_shutdown_request(); |
|
8195 |
} |
|
8196 |
|
|
8197 |
void termsig_setup(void) |
|
8198 |
{ |
|
8199 |
struct sigaction act; |
|
8200 |
|
|
8201 |
memset(&act, 0, sizeof(act)); |
|
8202 |
act.sa_handler = termsig_handler; |
|
8203 |
sigaction(SIGINT, &act, NULL); |
|
8204 |
sigaction(SIGHUP, &act, NULL); |
|
8205 |
sigaction(SIGTERM, &act, NULL); |
|
8206 |
} |
|
8207 |
|
|
8208 |
#endif |
|
8209 |
|
|
8188 | 8210 |
int main(int argc, char **argv) |
8189 | 8211 |
{ |
8190 | 8212 |
#ifdef CONFIG_GDBSTUB |
... | ... | |
9073 | 9095 |
#endif |
9074 | 9096 |
} |
9075 | 9097 |
|
9098 |
#ifndef _WIN32 |
|
9099 |
/* must be after terminal init, SDL library changes signal handlers */ |
|
9100 |
termsig_setup(); |
|
9101 |
#endif |
|
9102 |
|
|
9076 | 9103 |
/* Maintain compatibility with multiple stdio monitors */ |
9077 | 9104 |
if (!strcmp(monitor_device,"stdio")) { |
9078 | 9105 |
for (i = 0; i < MAX_SERIAL_PORTS; i++) { |
Also available in: Unified diff