Re: [dev] [st][PATCH v2] Add tty line support

From: Alex Pilon <alp_AT_alexpilon.ca>
Date: Tue, 21 Apr 2015 10:12:30 -0400

On Tue, Apr 14, 2015 at 12:35:52PM +0200, Roberto E. Vargas Caballero wrote:
> + if (opt_line) {
> + if((cmdfd = open(opt_line, O_RDWR)) < 0)
> + die("open line failed: %s\n", strerror(errno));
> + close(STDIN_FILENO);
> + dup(cmdfd);
> + stty();
> + return;

Is the duplication of the cmdfd without saving the duplicated file
descriptor intentional?

    st.c:1346:3: warning: ignoring return value of function declared with warn_unused_result attribute [-Wunused-result]
                    dup(cmdfd);
                    ^~~ ~~~~~

Regards,

Alex Pilon

Received on Tue Apr 21 2015 - 16:12:30 CEST

This archive was generated by hypermail 2.3.0 : Tue Apr 21 2015 - 16:24:09 CEST