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
- application/pgp-signature attachment: stored
Received on Tue Apr 21 2015 - 16:12:30 CEST