You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Open stderr as a pipe which is continuously drained
166
+
* via a separate thread (forwarding to the globus logging system).
167
+
*/
168
+
staticvoid
169
+
setup_hdfs_logging()
170
+
{
171
+
charfd2_path[PATH_MAX];
172
+
ssize_tbytes_in_path;
173
+
if ((-1== (bytes_in_path=readlink("/dev/fd/2", fd2_path, PATH_MAX-1))) && (errno!=ENOENT) && (errno!=EACCES))
174
+
{
175
+
globus_gfs_log_message(GLOBUS_GFS_LOG_ERR, "Unable to check /dev/fd/2 as eUID %d (UID %d) to see if it is /dev/null. (errno=%d, %s)\n", geteuid(), getuid(), errno, strerror(errno));
176
+
return;
177
+
}
178
+
if (bytes_in_path >= 0) {fd2_path[bytes_in_path] ='\0';}
179
+
if ((bytes_in_path!=-1) &&strcmp("/dev/null", fd2_path))
180
+
{
181
+
globus_gfs_log_message(GLOBUS_GFS_LOG_DUMP, "stderr does not point to /dev/null; not redirecting HDFS output.\n");
182
+
return;
183
+
}
184
+
185
+
interr;
186
+
pthread_attr_tattr;
187
+
if ((err=pthread_attr_init(&attr)))
188
+
{
189
+
globus_gfs_log_message(GLOBUS_GFS_LOG_ERR, "Unable to initialize pthread attribute: (errno=%d, %s).\n", err, sterror(err));
0 commit comments