mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-27 17:56:15 +00:00
overlay: Detach from terminal
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
d929102591
commit
39f9812315
@ -734,12 +734,13 @@ int main(int argc, char **argv)
|
||||
struct overlay_context ctx;
|
||||
struct config config;
|
||||
int index, sample_period;
|
||||
int daemonize = 1;
|
||||
int i;
|
||||
|
||||
config_init(&config);
|
||||
|
||||
opterr = 0;
|
||||
while ((i = getopt_long(argc, argv, "c:", long_options, &index)) != -1) {
|
||||
while ((i = getopt_long(argc, argv, "c:f", long_options, &index)) != -1) {
|
||||
switch (i) {
|
||||
case 'c':
|
||||
config_parse_string(&config, optarg);
|
||||
@ -750,6 +751,9 @@ int main(int argc, char **argv)
|
||||
case 'P':
|
||||
config_set_value(&config, "window", "position", optarg);
|
||||
break;
|
||||
case 'f':
|
||||
daemonize = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -770,6 +774,9 @@ int main(int argc, char **argv)
|
||||
if (ctx.surface == NULL)
|
||||
return ENOMEM;
|
||||
|
||||
if (daemonize && daemon(0, 0))
|
||||
return EINVAL;
|
||||
|
||||
signal(SIGUSR1, signal_snapshot);
|
||||
|
||||
debugfs_init();
|
||||
|
Loading…
x
Reference in New Issue
Block a user