File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ public class Monitor.Process : GLib.Object {
1818 // User id
1919 public int uid;
2020
21- public string username;
21+ public string username = Utils . NO_DATA ;
2222
2323 Icon _icon;
2424 public Icon icon {
@@ -83,9 +83,14 @@ public class Monitor.Process : GLib.Object {
8383 GTop . get_proc_uid (out proc_uid, stat. pid);
8484 uid = proc_uid. uid;
8585
86- // getting username
87- unowned Posix . Passwd passwd = Posix . getpwuid (uid);
88- username = passwd. pw_name;
86+
87+ // getting username
88+ // @TOFIX: Can't get username for postgres when started from docker (?)
89+ unowned Posix . Passwd passwd = Posix . getpwuid (uid);
90+ if (passwd != null ){
91+ username = passwd. pw_name;
92+ }
93+
8994
9095 exists = parse_stat () && read_cmdline ();
9196 get_usage (0 , 1 );
You can’t perform that action at this time.
0 commit comments