Bug#206572: screen: -ls should list sessons sorted chronologically
Hi Ben, Doesn't the ctime value from fstat(2) give the time the session was created? That seems like a more useful criterion. all three timestamps are modified by detach/attach. Writing messages to the fifo changes mtime and ctime (the latter being quite strange), receiving changes atime, and toggling the u+x mode bit (to record the Session Attached/Detached state) changes ctime as well. screen even calls utimes() to prevent the socket files from deletion by tempreaper tools, but it doesn't help disabling it due to the above reasons. Regards, Jan signature.asc Description: Digital signature
Bug#206572: screen: -ls should list sessons sorted chronologically
On 20-Apr-2008, Jan Christoph Nordholz wrote: all three timestamps are modified by detach/attach. Writing messages to the fifo changes mtime and ctime (the latter being quite strange), That is strange. Perhaps it warrants another bug report? This bug could then depend on that one. -- \ “As far as the laws of mathematics refer to reality, they are | `\not certain, and as far as they are certain, they do not refer | _o__) to reality.” —Albert Einstein, 1983 | Ben Finney [EMAIL PROTECTED] signature.asc Description: Digital signature
Bug#206572: screen: -ls should list sessons sorted chronologically
Hi, all three timestamps are modified by detach/attach. Writing messages to the fifo changes mtime and ctime (the latter being quite strange), That is strange. Perhaps it warrants another bug report? This bug could then depend on that one. no, that observation wasn't even related to screen - I made it when experimenting manually with two bash instances and a fifo. Disabling the utimes() call results in minimal differences (for instance, while screen asks for a password, a/mtime differ from ctime), but nothing useful. Regards, Jan signature.asc Description: Digital signature
Bug#206572: screen: -ls should list sessons sorted chronologically
On 20-Apr-2008, Jan Christoph Nordholz wrote: no, that observation wasn't even related to screen - I made it when experimenting manually with two bash instances and a fifo. Further investigation shows this is defined behaviour for Unix (and correctly implemented in Linux). Upon successful completion, [...] write() shall mark for update the st_ctime and st_mtime fields of the file, [...] URL:http://www.opengroup.org/onlinepubs/009695399/functions/write.html The 'ctime' field is not, as I had previously thought, the creation time, but rather the time of last status change (as opposed to 'mtime', the time of last data modification) URL:http://www.opengroup.org/onlinepubs/009695399/basedefs/sys/stat.h.html. So it seem that there is currently no useful file-status time field to order by for the session FIFOs. Should one be created as an attribute of screen's session data? -- \ The right to use [strong cryptography] is the right to speak | `\ Navajo. -- Eben Moglen | _o__) | Ben Finney [EMAIL PROTECTED] signature.asc Description: Digital signature
Bug#206572: screen: -ls should list sessons sorted chronologically
Hi, Further investigation shows this is defined behaviour for Unix (and correctly implemented in Linux). yes, I suspected that, but couldn't find anything myself - bad google-fu tonight. Thanks for looking it up. So it seem that there is currently no useful file-status time field to order by for the session FIFOs. Should one be created as an attribute of screen's session data? Indeed, the fifo is useless. Assuming the session is local, one could use the pid part of the $STY/fifo name to get the initial session creation time through /proc/$pid/stat... a bit hackish, but it should work. I'll prepare a patch and see if it works out. Regards, Jan signature.asc Description: Digital signature
Bug#206572: screen: -ls should list sessons sorted chronologically
initial session creation time through /proc/$pid/stat.. That sounds good to me. - Jim Van Zandt -Original Message- From: Jan Christoph Nordholz [mailto:[EMAIL PROTECTED] Sent: Sat 4/19/2008 12:44 PM To: [EMAIL PROTECTED]; Van Zandt, Jim Subject: Re: screen: -ls should list sessons sorted chronologically Hi, the only timestamp we have is the time of last attachment/detachment (and we can't even tell them apart), and I don't think that sorting by that criterion is incredibly useful... so I'd like to tag this bug 'wontfix' if no-one objects. Regards, Jan
Bug#206572: screen: -ls should list sessons sorted chronologically
Hi, the only timestamp we have is the time of last attachment/detachment (and we can't even tell them apart), and I don't think that sorting by that criterion is incredibly useful... so I'd like to tag this bug 'wontfix' if no-one objects. Regards, Jan signature.asc Description: Digital signature
Bug#206572: screen: -ls should list sessons sorted chronologically
On 19-Apr-2008, Jan Christoph Nordholz wrote: the only timestamp we have is the time of last attachment/detachment (and we can't even tell them apart) Doesn't the ctime value from fstat(2) give the time the session was created? That seems like a more useful criterion. -- \ “I wish there was a knob on the TV to turn up the | `\ intelligence. There's a knob called 'brightness' but it doesn't | _o__) work.” —Eugene P. Gallagher | Ben Finney [EMAIL PROTECTED] signature.asc Description: Digital signature