summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--inotail.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/inotail.c b/inotail.c
index 6346ee5..1fa1645 100644
--- a/inotail.c
+++ b/inotail.c
@@ -335,10 +335,16 @@ static int watch_files(struct file_struct *f, int n_files)
}
for (i = 0; i < n_files; i++) {
- if (!f[i].ignore)
+ if (!f[i].ignore) {
f[i].i_watch = inotify_add_watch(ifd, f[i].name,
IN_MODIFY|IN_DELETE_SELF|IN_MOVE_SELF|IN_UNMOUNT);
- else
+
+ if (f[i].i_watch < 0) {
+ fprintf(stderr, "Error: Could not create inotify watch on file '%s' (%s)\n", f[i].name, strerror(errno));
+ f[i].ignore = 1;
+ n_ignored++;
+ }
+ } else
n_ignored++;
}
t_conn_lock mutex in struct rds_tcp_connection. The rds_conn_state is checked in rds_tcp_conn_connect() after acquiring the t_conn_lock mutex. A SYN is sent out only if the RDS connection is not already UP (an UP would indicate that rds_tcp_accept_one() has completed 3WH, so no SYN needs to be generated). Similarly, the rds_conn_state is checked in rds_tcp_accept_one() after acquiring the t_conn_lock mutex. The only acceptable states (to allow continuation of the arbitration logic) are UP (i.e., outgoing SYN was SYN-ACKed by peer after it sent us the SYN) or CONNECTING (we sent outgoing SYN before we saw incoming SYN). Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com> Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat