[
https://issues.apache.org/jira/browse/HDFS-15843?focusedWorklogId=555657&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-555657
]
ASF GitHub Bot logged work on HDFS-15843:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 22/Feb/21 07:53
Start Date: 22/Feb/21 07:53
Worklog Time Spent: 10m
Work Description: jojochuang commented on a change in pull request #2710:
URL: https://github.com/apache/hadoop/pull/2710#discussion_r580041924
##########
File path:
hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/examples/c/connect_cancel/connect_cancel.c
##########
@@ -43,10 +42,10 @@ const char *catch_exit = "Exiting the signal handler.\n";
// Print to stdout without calling malloc or otherwise indirectly modify
userspace state.
// Write calls to stdout may still interleave with stuff coming from elsewhere.
static void sighandler_direct_stdout(const char *msg) {
- if(!msg)
+ if(!msg) {
return;
- ssize_t res = write(1 /*posix stdout fd*/, msg, strlen(msg));
- (void)res;
+ }
+ printf("%s", msg);
Review comment:
was this line added to debug and not needed?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 555657)
Time Spent: 0.5h (was: 20m)
> Make write cross platform
> -------------------------
>
> Key: HDFS-15843
> URL: https://issues.apache.org/jira/browse/HDFS-15843
> Project: Hadoop HDFS
> Issue Type: Improvement
> Components: libhdfs++
> Affects Versions: 3.2.2
> Reporter: Gautham Banasandra
> Assignee: Gautham Banasandra
> Priority: Major
> Labels: pull-request-available
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> We're currently using the *write* function from unistd.h which isn't
> cross-platform. We need to replace this with *std::cout.write* instead.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]