diff --git a/README.md b/README.md index 963562c..9d0bfb6 100644 --- a/README.md +++ b/README.md @@ -194,6 +194,7 @@ Please create [issues](https://github.com/hakavlad/nohang/issues). Use cases, fe - Print in terminal with colors - Optimize limiting `oom_score_adj`: now it can works without UID=0 - Optimize GUI warnings: find env without run `ps` and `env` (partially implemented) + - Fix conf parsing: use of `line.partition('=')` instead of `line.split('=')` - Add `oom-sort` - Add `oom-trigger` (partially implemented) diff --git a/nohang b/nohang index c4b47cc..8047b58 100755 --- a/nohang +++ b/nohang @@ -813,8 +813,8 @@ try: etc = line.startswith('$ETC') if not a and not b and not c and not d and not etc: - a = line.split('=') - config_dict[a[0].strip()] = a[1].strip() + a = line.partition('=') + config_dict[a[0].strip()] = a[2].strip() if etc: a = line[4:].split('///') @@ -1387,9 +1387,6 @@ if print_config: print('avoid_re_uid: {}'.format(avoid_re_uid)) print('avoid_uid_factor: {}'.format(avoid_uid_factor)) - - - print('\n5. The execution of a specific command instead of sending the\nSIGTERM signal\n') print('execute_the_command: {}'.format(execute_the_command)) if execute_the_command: diff --git a/nohang.conf b/nohang.conf index 297f213..1b5c675 100644 --- a/nohang.conf +++ b/nohang.conf @@ -167,9 +167,9 @@ avoid_factor = 3 # re_match_cmdline = True - # this default pattern for prefer childs of chromium & firefox -prefer_re_cmdline = renderer|childID -prefer_cmd_factor = 10 + # this default pattern for prefer + # childs of firefox and chromium +prefer_re_cmdline = -childID|--type=renderer avoid_re_cmdline = ^/usr/lib/virtualbox avoid_cmd_factor = 3