/proc/pid/stat und tty
-
also hallo erst mal, ich hab da ein kleines Problem und komm da gerade nicht weiter.
Problem: Wenn man sich /proc/ pid /stat mal anschaut ist ja wie man aus man 5 proc entnehmen kann der 7. Wert die tty des Programms, wie bekomm ich aber raus welche tty das ist also wie in ps aux oder mit w (finger ....)
habs schon mit ttyname versucht bekomm aber immer nur NULL als rückgabe. Hab auch schonmal im Quellcode von ps und top nachgesehen, bin aber nicht wirklich schlau daraus geworden, und im netz fand ich auch nix. Wär super net wenn ihr mir weiterhelfen könntet.