Screen 5.0.0 is the next major release of GNU Screen. Unfortunatly while testing sysutils/screen-devel I discovered bugs with its hardstatus implementation. Existing hardstatus failed to work correctly. I had opened a bug with the GNU Screen upstream. They had fixed one of the bugs however the last time I tested screen-devel, some status strings were still unavailable, not to mention that the hardstatus string syntax has changed. Therefore I don't believe screen50 should replace screen49 as our default GNU screen until a) some of the issues are resolved and b) we the FreeBSD community have had a little more experience with it. People who wish to use screen50 will need to uninstall screen (currently a meta port pointing to screen49) and install screen50. Any bugzilla bugs will likely spawn an upstream bug report by myself.
40 lines
745 B
C
40 lines
745 B
C
--- misc.c.orig 2024-03-26 16:41:57.000000000 -0700
|
|
+++ misc.c 2024-04-03 11:32:35.844473000 -0700
|
|
@@ -32,8 +32,10 @@
|
|
|
|
#include <poll.h>
|
|
#include <sys/types.h>
|
|
+#include <sys/user.h>
|
|
#include <sys/stat.h> /* mkdir() declaration */
|
|
#include <signal.h>
|
|
+#include <libutil.h>
|
|
#include <stdint.h>
|
|
#include <string.h>
|
|
#include <stdbool.h>
|
|
@@ -225,6 +227,7 @@
|
|
char *p;
|
|
|
|
if (str == NULL) {
|
|
+
|
|
*buf = 0;
|
|
return 0;
|
|
}
|
|
@@ -238,3 +241,17 @@
|
|
*p = 0;
|
|
return p - buf;
|
|
}
|
|
+
|
|
+time_t
|
|
+SessionCreationTime(fifo)
|
|
+const char *fifo;
|
|
+{
|
|
+ int pid = atoi(fifo);
|
|
+ if (pid <= 0) return 0;
|
|
+
|
|
+ struct kinfo_proc * kip = kinfo_getproc(pid);
|
|
+ if (kip == 0) return 0;
|
|
+ time_t start = kip->ki_start.tv_sec;
|
|
+ free (kip);
|
|
+ return start;
|
|
+}
|