diff options
author | Bryan Cantrill <bryan@joyent.com> | 2012-08-03 19:23:29 +0000 |
---|---|---|
committer | Robert Mustacchi <rm@joyent.com> | 2013-11-06 17:20:21 -0800 |
commit | 72102e7461c97dc268d21d9dd8f02da45f174acd (patch) | |
tree | bb9ad3093bfda709f66f4c8758f02edeec24e8c1 /usr/src/man/man3c/port_associate.3c | |
parent | b3d32f0ceb59362ba287dcfd6de471e98bfc7fa9 (diff) | |
download | illumos-joyent-72102e7461c97dc268d21d9dd8f02da45f174acd.tar.gz |
3928 `tail -f ...` doesn't notice file truncation
3929 `man tail` doesn't mentioned "-F" option
3930 'tail -F ...' not resetting the offset of file rotation properly
3968 want FILE_TRUNC event for PORT_SOURCE_FILE
Reviewed by: Gordon Ross <gordon.ross@nexenta.com>
Approved by: Dan McDonald <danmcd@nexenta.com>
Diffstat (limited to 'usr/src/man/man3c/port_associate.3c')
-rw-r--r-- | usr/src/man/man3c/port_associate.3c | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/usr/src/man/man3c/port_associate.3c b/usr/src/man/man3c/port_associate.3c index d876b5c9d7..f6e66b0d65 100644 --- a/usr/src/man/man3c/port_associate.3c +++ b/usr/src/man/man3c/port_associate.3c @@ -73,21 +73,21 @@ the port. .LP Objects of type \fBPORT_SOURCE_FILE\fR are pointer to the structure \fBfile_obj\fR defined in \fB<sys/port.h>\fR. This event source provides event -notification when the specified file/directory is accessed or modified or when -its status changes. The path name of the file/directory to be watched is passed -in the \fBstruct file_obj\fR along with the \fBaccess\fR, \fBmodification\fR, -and \fBchange\fR time stamps acquired from a \fBstat\fR(2) call. If the file -name is a symbolic links, it is followed by default. The \fBFILE_NOFOLLOW\fR -needs to be passed in along with the specified events if the symbolic link -itself needs to be watched and \fBlstat()\fR needs to be used to get the file -status of the symbolic link file. +notification when the specified file/directory is accessed, modified, +truncated or when its status changes. The path name of the file/directory to +be watched is passed in the \fBstruct file_obj\fR along with the \fBaccess\fR, +\fBmodification\fR, and \fBchange\fR time stamps acquired from a \fBstat\fR(2) +call. If the file name is a symbolic link, it is followed by default. The +\fBFILE_NOFOLLOW\fR needs to be passed in along with the specified events if +the symbolic link itself needs to be watched and \fBlstat()\fR needs to be +used to get the file status of the symbolic link file. .sp .LP The \fBstruct file_obj\fR contains the following elements: .sp .in +2 .nf -timestruc_t fo_atime; /* Access time got from stat() */ +timestruc_t fo_atime; /* Access time from stat() */ timestruc_t fo_mtime; /* Modification time from stat() */ timestruc_t fo_ctime; /* Change time from stat() */ char *fo_name; /* Pointer to a null terminated path name */ @@ -104,11 +104,13 @@ occurs. .sp .LP The event types that can be specified at \fBport_associate()\fR time for -\fBPORT_SOURCE_FILE\fR are \fBFILE_ACCESS\fR, \fBFILE_MODIFIED\fR, and -\fBFILE_ATTRIB\fR, corresponding to the three time stamps. An \fBfo_atime\fR -change results in the \fBFILE_ACCESS\fR event, an \fBfo_mtime\fR change results -in the \fBFILE_MODIFIED\fR event, and an \fBfo_time\fR change results in the -\fBFILE_ATTRIB\fR event. +\fBPORT_SOURCE_FILE\fR are \fBFILE_ACCESS\fR, \fBFILE_MODIFIED\fR, +\fBFILE_ATTRIB\fR, and \fbFILE_TRUNC\fR. The first three of these correspond +to the three time stamps: an \fBfo_atime\fR change results in the +\fBFILE_ACCESS\fR event, an \fBfo_mtime\fR change results in the +\fBFILE_MODIFIED\fR event, and an \fBfo_ctime\fR change results in the +\fBFILE_ATTRIB\fR event. If the operation that induced the time stamp update +also truncated the file, \fBFILE_TRUNC\fR will be set in the resulting event. .sp .LP The following exception events are delivered when they occur. These event types |